[Lazarus] Key scan codes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Key scan codes

Free Pascal - Lazarus mailing list
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
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Key scan codes

Free Pascal - Lazarus mailing list
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
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Key scan codes

Free Pascal - Lazarus mailing list
Yes. That is what I wanted. Thanks!

Sent from my iPhone

> On May 29, 2017, at 07:17, shoKwave via Lazarus <[hidden email]> 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
> [hidden email]
> http://lists.lazarus-ide.org/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus