1.5 Hardware Functions

Hardware functions alter the state of input devices and obtain state information. Windows uses the mouse and the keyboard as input devices. The following list briefly describes each hardware function:

Function Description  
EnableHardwareInput Enables or disables mouse and keyboard input throughout the application.  
GetAsyncKeyState Returns interrupt-level information about the key state.  
GetInputState Returns TRUE if there is mouse or keyboard input.  
GetKBCodePage Determines which OEM/ANSI tables are loaded.  
GetKeyboardState Copies an array that contains the state of keyboard keys.  
GetKeyNameText Retrieves a string containing the name of a key from a list maintained by the keyboard driver.  
GetKeyState Retrieves the state of a virtual key.  
MapVirtualKey Accepts a virtual-key code or scan code for a key and returns the corresponding scan code, virtual-key code, or ASCII value.  
OemKeyScan Maps OEM ASCII codes 0 through 0x0FF into the OEM scan codes and shift states.  
SetKeyboardState Sets the state of keyboard keys by altering values in an array.  
VkKeyScan Translates an ANSI character to the corresponding virtual-key code and shift state for the current
keyboard.