WaitForKeyEx(...) no works well

Started by archimede, June 29, 2022, 03:49:27 AM

Previous topic - Next topic

archimede

I made this test program:
WaitForKeyEx ( "A,!A", -1 )
sTest = "True"
but it works ONLY when I press "A"; it no works when I press Alt + A
The WaitForKeyEx(...) manual tell:
...
To enter an Alt, Control, or Shift key combination, precede the desired character with one or more of the following symbols:
Alt !
Control ^
Shift +

ChuckC

Re-read the help text for WaitForKeyEx().

Quote
Syntax:
WaitForKeyEx (keycodes, timeout)

Parameters:
(s) keycodes a tab-delimited list of up to 100 keys to wait for. See WaitForKey for a list of key codes.

(i) timeout the number of seconds to wait before returning.


kdmoyers

The key bit there is it's a tab delimited list, like
Code (winbatch) Select
"A":@tab:"!A"
The mind is everything; What you think, you become.