 |
 |
Keyboard Input ..msdn Add comment |
 |
|
ActivateKeyboardLayout
|
|
The ActivateKeyboardLayout function sets the input locale identifier (formerly called the keyboard layout handle) for the calling thread or the current process. The input locale identifier specifies a locale as well as the physical layout of the keyboard. |
|
 |
 |
 |
|
BlockInput
|
|
Blocks keyboard and mouse input events from reaching applications. |
|
 |
 |
 |
|
EnableWindow
|
|
Enables or disables mouse and keyboard input to the specified window or control. |
|
 |
 |
 |
|
GetActiveWindow
|
|
The GetActiveWindow function retrieves the window handle to the active window attached to the calling thread"s message queue. |
|
 |
 |
 |
|
GetAsyncKeyState
|
|
The GetAsyncKeyState function 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 GetAsyncKeyState. |
|
 |
 |
 |
|
GetFocus
|
|
Retrieves the handle to the window that has the keyboard focus, if the window is attached to the calling thread"s message queue. |
|
 |
 |
 |
|
GetKBCodePage
|
|
Returns the current code page. |
|
 |
 |
 |
|
GetKeyboardLayout
|
|
The GetKeyboardLayout function retrieves the active input locale identifier (formerly called the keyboard layout) for the specified thread. If the idThread parameter is zero, the input locale identifier for the active thread is returned. |
|
 |
 |
 |
|
GetKeyboardLayoutList
|
|
The GetKeyboardLayoutList function retrieves the input locale identifiers (formerly called keyboard layout handles) corresponding to the current set of input locales in the system. |
|
 |
 |
 |
|
GetKeyboardLayoutName
|
|
The GetKeyboardLayoutName function retrieves the name of the active input locale identifier (formerly called the keyboard layout). |
|
 |
 |
 |
|
GetKeyboardState
|
|
The GetKeyboardState function copies the status of the 256 virtual keys to the specified buffer. |
|
 |
 |
 |
|
GetKeyNameText
|
|
The GetKeyNameText function retrieves a string that represents the name of a key. |
|
 |
 |
 |
|
GetKeyState
|
|
The GetKeyState function retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled (on, offalternating each time the key is pressed). |
|
 |
 |
 |
|
IsWindowEnabled
|
|
The IsWindowEnabled function determines whether the specified window is enabled for mouse and keyboard input. |
|
 |
 |
 |
|
keybd_event
|
|
Synthesizes a keystroke.
|
|
 |
 |
 |
|
MapVirtualKey
|
|
Translates (maps) a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code. |
|
 |
 |
 |
|
RegisterHotKey
|
|
The RegisterHotKey function defines a system-wide hot key. |
|
 |
 |
 |
|
SetFocus
|
|
Sets the keyboard focus to the specified window. The window must be attached to the calling thread"s message queue |
|
 |
 |
 |
|
SetKeyboardState
|
|
The SetKeyboardState function copies a 256-byte array of keyboard key states into the calling thread"s keyboard input-state table. |
|
 |
 |
 |
|
ToAscii
|
|
Translates the specified virtual-key code and keyboard state to the corresponding character or characters. |
|
 |
 |
 |
|
UnregisterHotKey
|
|
The UnregisterHotKey function frees a hot key previously registered by the calling thread. |
|
 |
 |
 |
|
VkKeyScan
|
|
Translates a character to the corresponding virtual-key code and shift state for the current keyboard. |
|
 |
 |
 |
 |
| Code examples: |
 |
|
|
 |
|
|