Method keys.more.sendKey
Overload
Sends single key.
public static void sendKey(KKey k, bool? down = null, nint hkl = 0, int? extra = null, bool dontThrow = false)
Parameters
k (KKey)
Virtual-key code. |
down (bool?)
|
hkl (nint)
Keyboard layout handle for scan code. See API GetKeyboardLayout. If 0 (default), uses keyboard layout of this thread; don't use 0 for keys whose scancode depends on keyboard layout. If -1, uses keyboard layout of the focused or active window. |
extra (int?)
An "extra info" value that can be used for example by keyboard hooks to recognize the key sender. If |
dontThrow (bool)
Don't throw exception. |
Exceptions
Remarks
This is a low-level function. Does nothing more (sleep, block input, etc). Does not use opt options. Just gets missing info (scan code etc) and calls API SendInput.