mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
key: add fallback when second column unavailable
This allows to translate certain combinaison like Shift+Insert. Insert exists, but Shift+Insert converts to no symbol, resulting in XCB_NONE returned. We return either the k0 alternative, without shift, so we got at least the 'simple' keysym. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
c242657c3b
commit
cdbbe39011
1 changed files with 4 additions and 0 deletions
4
key.c
4
key.c
|
@ -205,6 +205,10 @@ key_getkeysym(xcb_keycode_t detail, uint16_t state)
|
|||
k1 = xcb_key_symbols_get_keysym(globalconf.keysyms, detail, 1);
|
||||
}
|
||||
|
||||
/* If the second column does not exists use the first one. */
|
||||
if(k1 == XCB_NONE)
|
||||
k1 = k0;
|
||||
|
||||
/* The numlock modifier is on and the second KeySym is a keypad
|
||||
* KeySym */
|
||||
if((state & globalconf.numlockmask) && xcb_is_keypad_key(k1))
|
||||
|
|
Loading…
Reference in a new issue