dos_asynckeystate - dalefugier/DOSLib GitHub Wiki
Determines whether a key is up or down at the time the function is called, and whether the key was pressed after a previous call to dos_asynckeystate. For more information, see MSDN for information on the GetAsyncKeyState Windows API function.
Syntax
(dos_asynckeystatetitle virtual-key)
Parameters
virtual-key
The virtual-key code. For more information, see Virtual Key Codes.
Returns
If the function succeeds, the return value specifies whether the key was pressed since the last call to dos_asynckeystate, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to dos_asynckeystate.
Version
9.1
Examples
Command: (setq SHORT_MAX 32768)
32768
Command: (setq VK_SHIFT 16)
32
Command: (= (logand (dos_asynckeystate VK_SHIFT) SHORT_MAX) SHORT_MAX)
nil
Command: (= (logand (dos_asynckeystate VK_SHIFT) SHORT_MAX) SHORT_MAX)
T