refactor: call xkb_keymp_num_levels_for_key, to apply shift in EiState::mapKeyfromKeyval
This commit is contained in:
parent
5fc4e9dba6
commit
a34971fee7
1 changed files with 2 additions and 1 deletions
|
|
@ -319,8 +319,9 @@ KeyID EiKeyState::mapKeyFromKeyval(uint32_t keyval) const
|
||||||
// and xkb_state_key_get_one_sym() would return XF86_Switch_VT_* when Ctrl+Alt are
|
// and xkb_state_key_get_one_sym() would return XF86_Switch_VT_* when Ctrl+Alt are
|
||||||
// pressed, instead of F1. We want to send F1 + modifiers to the server, not the
|
// pressed, instead of F1. We want to send F1 + modifiers to the server, not the
|
||||||
// VT switch action.
|
// VT switch action.
|
||||||
|
const auto shifted = xkb_keymap_num_levels_for_key(m_xkbKeymap, keyval, 0);
|
||||||
const xkb_keysym_t *syms;
|
const xkb_keysym_t *syms;
|
||||||
int nsyms = xkb_keymap_key_get_syms_by_level(m_xkbKeymap, keyval, 0, 0, &syms);
|
int nsyms = xkb_keymap_key_get_syms_by_level(m_xkbKeymap, keyval, 0, shifted, &syms);
|
||||||
|
|
||||||
xkb_keysym_t xkbKeysym;
|
xkb_keysym_t xkbKeysym;
|
||||||
if (nsyms > 0) {
|
if (nsyms > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue