5 /* create the microwindows keyboard device */
14 #endif /* _DEVICE_H */
17 * kbd_Open - Open the keyboard
18 * @pkd: Pointer to keyboard device
21 kbd_Open(KBDDEVICE *pkd)
27 memset(key_down_arr,0,sizeof(key_down_arr));
33 * mx1_kbd_Close - Closes keyboard
41 * mx1_kbd_Poll - Polls for keyboard events
43 * Returns non-zero value if change is detected.
56 * kbd_GetModifierInfo - Returns the possible modifiers for the keyboard
57 * @modifiers: If non-NULL, ones in defined modifiers bits are returned.
58 * @curmodifiers: If non-NULL, ones in actually active modifiers
62 kbd_GetModifierInfo(kbd_keymod_t *modifiers, kbd_keymod_t *curmodifiers)
65 *modifiers = 0; /* no modifiers available */
67 *curmodifiers = key_mod&~KBDMOD_SGM_SC;
71 * mx1_kbd_Read - Reads resolved MWKEY value, modifiers and scancode
72 * @buf: If non-NULL, resolved MWKEY is stored here
73 * @modifiers: If non-NULL, ones in actually active modifiers
75 * @scancode: If non-NULL, scancode of resolved key is stored
78 * This function reads one keystroke from the keyboard, and the current state
79 * of the modifier keys (ALT, SHIFT, etc). Returns -1 on error, 0 if no data
80 * is ready, 1 on a keypress, and 2 on keyrelease.
81 * This is a non-blocking call.
84 kbd_Read(kbd_key_t *buf, kbd_keymod_t *modifiers, kbd_scan_code_t *scancode)
93 *modifiers = key_mod&~KBDMOD_SGM_SC;
97 *scancode = key_last_changed;
99 *buf = kbd_scan2key(key_last_changed);