Lines Matching refs:control_key_state

1568 static __inline__ bool _is_shift_pressed(const DWORD control_key_state) {  in _is_shift_pressed()  argument
1569 return (control_key_state & SHIFT_PRESSED) != 0; in _is_shift_pressed()
1572 static __inline__ bool _is_ctrl_pressed(const DWORD control_key_state) { in _is_ctrl_pressed() argument
1573 return (control_key_state & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)) != 0; in _is_ctrl_pressed()
1576 static __inline__ bool _is_alt_pressed(const DWORD control_key_state) { in _is_alt_pressed() argument
1577 return (control_key_state & (LEFT_ALT_PRESSED | RIGHT_ALT_PRESSED)) != 0; in _is_alt_pressed()
1580 static __inline__ bool _is_numlock_on(const DWORD control_key_state) { in _is_numlock_on() argument
1581 return (control_key_state & NUMLOCK_ON) != 0; in _is_numlock_on()
1584 static __inline__ bool _is_capslock_on(const DWORD control_key_state) { in _is_capslock_on() argument
1585 return (control_key_state & CAPSLOCK_ON) != 0; in _is_capslock_on()
1588 static __inline__ bool _is_enhanced_key(const DWORD control_key_state) { in _is_enhanced_key() argument
1589 return (control_key_state & ENHANCED_KEY) != 0; in _is_enhanced_key()
1601 const KEY_EVENT_RECORD* const key_event, const DWORD control_key_state, in _get_char_ignoring_modifier() argument
1610 _is_shift_pressed(control_key_state)) || in _get_char_ignoring_modifier()
1612 _is_ctrl_pressed(control_key_state)) || in _get_char_ignoring_modifier()
1613 ((modifier == VK_MENU) && _is_alt_pressed(control_key_state))) { in _get_char_ignoring_modifier()
1616 key_state[VK_SHIFT] = _is_shift_pressed(control_key_state) ? in _get_char_ignoring_modifier()
1618 key_state[VK_CONTROL] = _is_ctrl_pressed(control_key_state) ? in _get_char_ignoring_modifier()
1620 key_state[VK_MENU] = _is_alt_pressed(control_key_state) ? in _get_char_ignoring_modifier()
1622 key_state[VK_CAPITAL] = _is_capslock_on(control_key_state) ? in _get_char_ignoring_modifier()
1654 const KEY_EVENT_RECORD* const key_event, const DWORD control_key_state) { in _get_non_control_char() argument
1655 return _get_char_ignoring_modifier(ch, key_event, control_key_state, in _get_non_control_char()
1661 const KEY_EVENT_RECORD* const key_event, const DWORD control_key_state) { in _get_non_alt_char() argument
1662 return _get_char_ignoring_modifier(ch, key_event, control_key_state, in _get_non_alt_char()
1670 const KEY_EVENT_RECORD* const key_event, const DWORD control_key_state) { in _get_control_character() argument
1672 control_key_state); in _get_control_character()
1674 if ((len == 1) && _is_ctrl_pressed(control_key_state)) { in _get_control_character()
1711 if (!_is_alt_pressed(control_key_state)) { in _get_control_character()
1716 if (!_is_alt_pressed(control_key_state)) { in _get_control_character()
1729 DWORD control_key_state = key_event->dwControlKeyState; in _normalize_altgr_control_key_state() local
1740 if (_is_ctrl_pressed(control_key_state) && in _normalize_altgr_control_key_state()
1741 _is_alt_pressed(control_key_state) in _normalize_altgr_control_key_state()
1746 if ((control_key_state & RIGHT_ALT_PRESSED) != 0) { in _normalize_altgr_control_key_state()
1748 control_key_state &= ~RIGHT_ALT_PRESSED; in _normalize_altgr_control_key_state()
1753 control_key_state &= ~LEFT_CTRL_PRESSED; in _normalize_altgr_control_key_state()
1754 } else if ((control_key_state & LEFT_ALT_PRESSED) != 0) { in _normalize_altgr_control_key_state()
1756 control_key_state &= ~LEFT_ALT_PRESSED; in _normalize_altgr_control_key_state()
1760 if ((control_key_state & LEFT_CTRL_PRESSED) != 0) { in _normalize_altgr_control_key_state()
1762 control_key_state &= ~LEFT_CTRL_PRESSED; in _normalize_altgr_control_key_state()
1763 } else if ((control_key_state & RIGHT_CTRL_PRESSED) != 0) { in _normalize_altgr_control_key_state()
1765 control_key_state &= ~RIGHT_CTRL_PRESSED; in _normalize_altgr_control_key_state()
1775 return control_key_state; in _normalize_altgr_control_key_state()
1783 const DWORD control_key_state) { in _normalize_keypad_control_key_state() argument
1784 if (!_is_numlock_on(control_key_state)) { in _normalize_keypad_control_key_state()
1785 return control_key_state; in _normalize_keypad_control_key_state()
1787 if (!_is_enhanced_key(control_key_state)) { in _normalize_keypad_control_key_state()
1800 return control_key_state | SHIFT_PRESSED; in _normalize_keypad_control_key_state()
1804 return control_key_state; in _normalize_keypad_control_key_state()
1807 static const char* _get_keypad_sequence(const DWORD control_key_state, in _get_keypad_sequence() argument
1809 if (_is_shift_pressed(control_key_state)) { in _get_keypad_sequence()
1826 DWORD control_key_state, const char* const normal) { in _get_modifier_sequence() argument
1833 control_key_state = _normalize_keypad_control_key_state(vk, in _get_modifier_sequence()
1834 control_key_state); in _get_modifier_sequence()
1836 if (_is_shift_pressed(control_key_state)) { in _get_modifier_sequence()
1839 if (_is_alt_pressed(control_key_state)) { // any alt key pressed in _get_modifier_sequence()
1842 if (_is_ctrl_pressed(control_key_state)) { // any control key pressed in _get_modifier_sequence()
1869 const DWORD control_key_state, const char* const normal, in _get_modifier_keypad_sequence() argument
1871 if (_is_shift_pressed(control_key_state)) { in _get_modifier_keypad_sequence()
1884 return _get_modifier_sequence(buf, vk, control_key_state, normal); in _get_modifier_keypad_sequence()
1942 const DWORD control_key_state = _normalize_altgr_control_key_state( in _console_read() local
1965 control_key_state, (normal)); \ in _console_read()
1973 seqstr = _get_keypad_sequence(control_key_state, (normal), \ in _console_read()
1984 control_key_state, (normal), (shifted)); \ in _console_read()
2000 if (_is_enhanced_key(control_key_state)) { in _console_read()
2003 if (_is_ctrl_pressed(control_key_state)) { in _console_read()
2032 if (_is_alt_pressed(control_key_state)) { in _console_read()
2040 if (_is_shift_pressed(control_key_state)) { in _console_read()
2052 if (_is_alt_pressed(control_key_state)) { in _console_read()
2054 } else if (_is_ctrl_pressed(control_key_state)) { in _console_read()
2067 if (_is_alt_pressed(control_key_state)) { in _console_read()
2069 } else if (_is_ctrl_pressed(control_key_state)) { in _console_read()
2108 control_key_state); in _console_read()
2110 if (_is_alt_pressed(control_key_state)) { in _console_read()
2126 control_key_state); in _console_read()
2130 if (_is_alt_pressed(control_key_state) && in _console_read()
2131 !(_is_ctrl_pressed(control_key_state) && in _console_read()
2132 !_is_shift_pressed(control_key_state))) { in _console_read()
2166 control_key_state); in _console_read()
2169 if (_is_alt_pressed(control_key_state)) { in _console_read()
2198 control_key_state); in _console_read()
2265 vk, _is_enhanced_key(control_key_state) ? "true" : "false"); in _console_read()