title: Delphi keypress and keybd_event
body: <p>I have 2 components. In the first one I write a keyboard character, I focuse the second then I use <code>keybd_event</code> to send the keyboard press (key down and key up). But if I press "o" I have <code>ord(Key)</code> which is 111 (OK for the ascii table). But <code>keybd_event</code> prints a <code>/</code></p>
  
  <pre><code>procedure TAutoComplete.AutoCompleteKeyPress(Sender: TObject; var Key: Char);
  var
      iKeyValue: integer;
  begin
      FXEdit.SetFocus;
  
      iKeyValue := ord(Key);
  
      keybd_event(iKeyValue, MapvirtualKey(iKeyValue, 0), 0, 0);
      keybd_event(iKeyValue, MapvirtualKey(iKeyValue, 0), KEYEVENTF_KEYUP, 0);
  end;
  </code></pre>
  
  <p>How can I convert the "key" to a byte for <code>keybd_event</code>?</p>