Support disabling default `exwm-mode-map' bindings

* exwm-input.el (exwm-input--on-KeyPress-line-mode): Use
`lookup-key' to check whether a the event is defined in the
`exwm-mode-map' keymap.
This commit is contained in:
Adrián Medraño Calvo 2018-03-05 00:00:00 +00:00 committed by Chris Feng
parent 57328b439f
commit dd0f10775a
2 changed files with 2 additions and 2 deletions

View file

@ -190,7 +190,7 @@ least SECS seconds later."
(active-minibuffer-window) (active-minibuffer-window)
(memq last-input-event exwm-input--global-prefix-keys) (memq last-input-event exwm-input--global-prefix-keys)
(memq last-input-event exwm-input-prefix-keys) (memq last-input-event exwm-input-prefix-keys)
(assq last-input-event (cdr exwm-mode-map)) (lookup-key exwm-mode-map (vector last-input-event))
(gethash last-input-event exwm-input--simulation-keys)) (gethash last-input-event exwm-input--simulation-keys))
(set-transient-map (make-composed-keymap (list exwm-mode-map (set-transient-map (make-composed-keymap (list exwm-mode-map
global-map))) global-map)))

View file

@ -566,7 +566,7 @@ instead."
;; ;;
(memq event exwm-input--global-prefix-keys) (memq event exwm-input--global-prefix-keys)
(memq event exwm-input-prefix-keys) (memq event exwm-input-prefix-keys)
(assq event (cdr exwm-mode-map)) (lookup-key exwm-mode-map (vector event))
(gethash event exwm-input--simulation-keys))) (gethash event exwm-input--simulation-keys)))
(setq mode xcb:Allow:AsyncKeyboard) (setq mode xcb:Allow:AsyncKeyboard)
(exwm-input--cache-event event)) (exwm-input--cache-event event))