Board index » delphi » Extended Key Codes

Extended Key Codes

How can a get Extended Key Codes when applying KeyPreview and Keypressed
eventhandlers?
In TP I used:
    Key:=ReadKey;
    If Key= #0 and KeyPressed then
      Key:=ReadKey;
    case Key of
        #80: Result = DownArrow;
        etc.
     end;
What has D5 to offer?
 

Re:Extended Key Codes


The message <ubzbwrcd$GA.266@net003s>
  from  "Constantijn Wolfs" <constantijn_wo...@hetnet.nl> contains
these words:

Quote
> How can a get Extended Key Codes when applying KeyPreview and Keypressed
> eventhandlers?
> In TP I used:
>     Key:=ReadKey;
>     If Key= #0 and KeyPressed then
>       Key:=ReadKey;
>     case Key of
>         #80: Result = DownArrow;
>         etc.
>      end;
> What has D5 to offer?

if you use OnKeyDown instead of OnKeyPressed the code
returned is an extended code as one word rather than
two bytes.

--
regards Andreas Kyriacou
http://www.andrikkos.co.uk

Other Threads