mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Detect unavailable keys properly. Fixes #592.
This commit is contained in:
parent
56db521a3e
commit
83a5f719d2
1 changed files with 2 additions and 2 deletions
|
@ -514,7 +514,7 @@ ARGS are additional arguments to CALLBACK."
|
||||||
keysyms keycode alt-modifier)
|
keysyms keycode alt-modifier)
|
||||||
(dolist (k exwm-input--global-prefix-keys)
|
(dolist (k exwm-input--global-prefix-keys)
|
||||||
(setq keysyms (xcb:keysyms:event->keysyms exwm--connection k))
|
(setq keysyms (xcb:keysyms:event->keysyms exwm--connection k))
|
||||||
(if (not keysyms)
|
(if (or (not keysyms) (= 0 (caar keysyms)))
|
||||||
(warn "Key unavailable: %s" (key-description (vector k)))
|
(warn "Key unavailable: %s" (key-description (vector k)))
|
||||||
(setq keycode (xcb:keysyms:keysym->keycode exwm--connection
|
(setq keycode (xcb:keysyms:keysym->keycode exwm--connection
|
||||||
(caar keysyms)))
|
(caar keysyms)))
|
||||||
|
@ -886,7 +886,7 @@ button event."
|
||||||
"Fake a key event equivalent to Emacs event EVENT."
|
"Fake a key event equivalent to Emacs event EVENT."
|
||||||
(let* ((keysyms (xcb:keysyms:event->keysyms exwm--connection event))
|
(let* ((keysyms (xcb:keysyms:event->keysyms exwm--connection event))
|
||||||
keycode id)
|
keycode id)
|
||||||
(when (= 0 (caar keysyms))
|
(when (or (not keysyms) (= 0 (caar keysyms)))
|
||||||
(user-error "[EXWM] Invalid key: %s" (single-key-description event)))
|
(user-error "[EXWM] Invalid key: %s" (single-key-description event)))
|
||||||
(setq keycode (xcb:keysyms:keysym->keycode exwm--connection
|
(setq keycode (xcb:keysyms:keysym->keycode exwm--connection
|
||||||
(caar keysyms)))
|
(caar keysyms)))
|
||||||
|
|
Loading…
Reference in a new issue