Keydown event handler using a combo of 2 keys

Hi, I have a toolbar menu defined with 2 menus
image

I do not have a mouse, I can only use 5 keys : up, down, left, right arrows + enter.

I defined “navigation” for my windows1 example, it works perfectly.

Now, I would like to set the focus to the menu. with a “full keyboard”, the key would be “alt”.
I would like to use the simultaneous press of left and right arrow keys to trigger the equivalent of the “alt” key , which sounds to me the easiest way to do this.
(I searched around asynchkeydown but finally not a good option…)
any idea how I can perform this ? for me the key of the event handler is only unique ?

Thanks

Look at Keyboard.AltKey

Here you go Lionel, I hope this is what you are after.

[LINK REMOVED PER OP REQUEST]

Information for future search:

SendInput
INPUT
KEYBDINPUT
1 Like

Hi , this is it . Thanks a million.
I assumed that the event handler was only taking care about 1 “event” at a time ( I did some test, but obviously, they were wrong )
Thanks a lot.

1 Like

That’s great to hear Lionel. Yes the KeyDown event will fire as soon as the key is pressed you can then check if other keys are being held down at that time with AsyncKeyDown

1 Like