MiniGUI API Reference (MiniGUI-Threads)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
Functions | |
MG_EXPORT BOOL GUIAPI | GetKeyStatus (UINT uKey) |
Gets a key or a mouse button status. More... | |
MG_EXPORT DWORD GUIAPI | GetShiftKeyStatus (void) |
Gets status of the shift keys. More... | |
MG_EXPORT void GUIAPI | GetKeyboardState (BYTE *kbd_state) |
Gets status of all keys on keyboard. More... | |
void GUIAPI GetKeyboardState | ( | BYTE * | kbd_state | ) |
Gets status of all keys on keyboard.
This function gets the status of all keys on keyboard.
The scancodes of all keys are defined in <minigui/common.h>.
kbd_state | The buffer returns the current status of all keys. Note that the length of the buffer should be larger than (MGUI_NR_KEYS + 1). |
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:
These constants and the scancodes of keys are defined in <minigui/common.h>.
uKey | Indicates the key or mouse button. |
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:
These constants are defined in <minigui/common.h>.