Asynchronous key status functions
[MiniGUI-Processes specific functions]

Functions


Function Documentation

BOOL GUIAPI GetKeyStatus ( UINT  uKey  ) 

Gets a key or a mouse button status.

This function gets a key or a mouse button status, returns TRUE when pressed, or FALSE when released. uKey indicates the key or mouse button. For keys on keyboard, uKey should be the scancode of the key, for mouse button, uKey should be one value of the following:

  • SCANCODE_LEFTBUTTON
    Left mouse button.
  • SCANCODE_MIDDLBUTTON
    Middle mouse button.
  • SCANCODE_RIGHTBUTTON
    Right mouse button.

These constants and the scancodes of keys are defined in <minigui/common.h>.

Parameters:
uKey Indicates the key or mouse button.
Returns:
Returns TRUE when pressed, or FALSE when released.
See also:
GetShiftKeyStatus
DWORD GUIAPI GetShiftKeyStatus ( void   ) 

Gets status of the shift keys.

This function gets ths status of the shift keys, the returned value indicates the status of shift keys -- CapsLock, ScrollLock, NumLock, Left Shift, Right Shift, Left Ctrl, Right Ctrl, Left Alt, and Right Alt. You can use KS_* ORed with the status value to determine one shift key's status:

  • KS_CAPSLOCK
    Indicates that CapsLock is locked.
  • KS_NUMLOCK
    Indicates that NumLock is locked.
  • KS_SCROLLLOCK
    Indicates that ScrollLock is locked.
  • KS_LEFTCTRL
    Indicates that left Ctrl key is pressed.
  • KS_RIGHTCTRL
    Indicates that right Ctrl key is pressed.
  • KS_CTRL
    Indicates that either left or right Ctrl key is pressed.
  • KS_LEFTALT
    Indicates that left Alt key is pressed.
  • KS_RIGHTALT
    Indicates that right Alt key is pressed.
  • KS_ALT
    Indicates that either left or right Alt key is pressed.
  • KS_LEFTSHIFT
    Indicates that left Shift key is pressed.
  • KS_RIGHTSHIFT
    Indicates that right Shift key is pressed.
  • KS_SHIFT
    Indicates that either left or right Shift key is pressed.

These constants are defined in <minigui/common.h>.

Returns:
The status of the shift keys.
See also:
Macros for key codes and shift status
Generated on Thu Apr 7 15:58:39 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3