From dd0f10775a1893abe3b5c753e9db12d1397c2f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Medra=C3=B1o=20Calvo?= Date: Mon, 5 Mar 2018 00:00:00 +0000 Subject: [PATCH] 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. --- exwm-core.el | 2 +- exwm-input.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exwm-core.el b/exwm-core.el index 0f48de2..7fd3a61 100644 --- a/exwm-core.el +++ b/exwm-core.el @@ -190,7 +190,7 @@ least SECS seconds later." (active-minibuffer-window) (memq last-input-event exwm-input--global-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)) (set-transient-map (make-composed-keymap (list exwm-mode-map global-map))) diff --git a/exwm-input.el b/exwm-input.el index 3794426..ee44624 100644 --- a/exwm-input.el +++ b/exwm-input.el @@ -566,7 +566,7 @@ instead." ;; (memq event exwm-input--global-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))) (setq mode xcb:Allow:AsyncKeyboard) (exwm-input--cache-event event))