Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-05

Key scan codes

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Larry Dalton

I need a function or procedure that will return the scan code for a keypress on both Linux systems and Windows, ie when the 'L' key is pressed it would return '$4C'.

Sent from my iPhone

Reply by email

shoKwave
to Larry Dalton

Something like:

procedure TForm1.FormKeyPress(Sender: TObject; var Key: char);
begin
   Label1.Caption := '$' + IntToHex(Ord(Key), 2);
end;
Larry Dalton wrote
I need a function or procedure that will return the scan code for a keypress on both Linux systems and Windows, ie when the 'L' key is pressed it would return '$4C'. Sent from my iPhone

Reply by email

Larry Dalton
to shoKwave

Yes. That is what I wanted. Thanks!

Sent from my iPhone

Show quoted text 20 lines
On May 29, 2017, at 07:17, shoKwave via Lazarus wrote: Something like: procedure TForm1.FormKeyPress(Sender: TObject; var Key: char); begin Label1.Caption := '$' + IntToHex(Ord(Key), 2); end; > Am 28.05.2017 um 23:11 schrieb Larry Dalton via Lazarus: > I need a function or procedure that will return the scan code for a keypress on both Linux systems and Windows, ie when the 'L' key is pressed it would return '$4C'. > > Sent from my iPhone -- _______________________________________________ Lazarus mailing list http://lists.lazarus-ide.org/listinfo/lazarus

Reply by email