Lines Matching +full:key +full:- +full:down

4  * top-level directory.
10 #include "ui/kbd-state.h"
23 if (test_bit(qcode1, kbd->keys) || test_bit(qcode2, kbd->keys)) { in qkbd_state_modifier_update()
24 set_bit(mod, kbd->mods); in qkbd_state_modifier_update()
26 clear_bit(mod, kbd->mods); in qkbd_state_modifier_update()
32 return test_bit(mod, kbd->mods); in qkbd_state_modifier_get()
37 return test_bit(qcode, kbd->keys); in qkbd_state_key_get()
40 void qkbd_state_key_event(QKbdState *kbd, QKeyCode qcode, bool down) in qkbd_state_key_event() argument
42 bool state = test_bit(qcode, kbd->keys); in qkbd_state_key_event()
44 if (down == false /* got key-up event */ && in qkbd_state_key_event()
45 state == false /* key is not pressed */) { in qkbd_state_key_event()
47 * Filter out suspicious key-up events. in qkbd_state_key_event()
49 * This allows simply sending along all key-up events, and in qkbd_state_key_event()
51 * corresponding key-down event wasn't sent to the guest, for in qkbd_state_key_event()
54 * Note that key-down events on already pressed keys are *not* in qkbd_state_key_event()
60 /* update key and modifier state */ in qkbd_state_key_event()
61 if (down) { in qkbd_state_key_event()
62 set_bit(qcode, kbd->keys); in qkbd_state_key_event()
64 clear_bit(qcode, kbd->keys); in qkbd_state_key_event()
86 if (down) { in qkbd_state_key_event()
87 change_bit(QKBD_MOD_CAPSLOCK, kbd->mods); in qkbd_state_key_event()
91 if (down) { in qkbd_state_key_event()
92 change_bit(QKBD_MOD_NUMLOCK, kbd->mods); in qkbd_state_key_event()
101 if (qemu_console_is_graphic(kbd->con)) { in qkbd_state_key_event()
102 qemu_input_event_send_key_qcode(kbd->con, qcode, down); in qkbd_state_key_event()
103 if (kbd->key_delay_ms) { in qkbd_state_key_event()
104 qemu_input_event_send_key_delay(kbd->key_delay_ms); in qkbd_state_key_event()
114 if (test_bit(qcode, kbd->keys)) { in qkbd_state_lift_all_keys()
123 kbd->con = con; in qkbd_state_switch_console()
128 kbd->key_delay_ms = delay_ms; in qkbd_state_set_delay()
140 kbd->con = con; in qkbd_state_init()