[Lazarus] Fwd: Re: How to detect that the Alt-key is released?
Jürgen Hestermann
juergen.hestermann at gmx.de
Sun Aug 2 14:52:49 CEST 2015
Am 2015-08-02 um 14:42 schrieb Jürgen Hestermann:
> Am 2015-08-02 um 14:33 schrieb JuuS:
>> (btw. this WON'T work in onkeyup with just the alt key...when you lift
>> alt (ie, keyup) it is no longer down and so is not in "Shift", to see it
>> work do something like alt-a).
> But that's just what I want:
> Detect the release of the Alt+key (independend from other keys state).
> So it's not possible?
Well, I just found out how it works myself:
---------------------------
procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if Key=vk_Menu then
ShowMessage(' ALT key released');
end;
---------------------------
The main point I missed was that I did not know that the Alt-key is "vk_Menu".
A strange name for the Alt-key. ;-(
More information about the Lazarus
mailing list