about summary refs log tree commit diff
path: root/exwm-input.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2018-02-25T16·23+0800
committerChris Feng <chris.w.feng@gmail.com>2018-02-25T16·23+0800
commita6cfe3f22d4dff076e3e5da6676c411a52d6590e (patch)
tree3a25037a465274e31d3fd6c4717af21710edb6e4 /exwm-input.el
parent7cef4320cca8aeba5c4c6df37842bd73f16996d9 (diff)
Forward keys defined in `exwm-mode-map' to Emacs by default
* exwm-input.el (exwm-input-prefix-keys): Remove ?\C-c.
(exwm-input--on-KeyPress-line-mode):
* exwm-core.el (): Detect keys in `exwm-mode-map' in line-mode.
Diffstat (limited to 'exwm-input.el')
-rw-r--r--exwm-input.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/exwm-input.el b/exwm-input.el
index fa9c1eb1d53d..e051603bad1f 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -44,8 +44,12 @@
   :group 'exwm)
 
 (defcustom exwm-input-prefix-keys
-  '(?\C-c ?\C-x ?\C-u ?\C-h ?\M-x ?\M-` ?\M-& ?\M-:)
-  "List of prefix keys EXWM should forward to Emacs when in line-mode."
+  '(?\C-x ?\C-u ?\C-h ?\M-x ?\M-` ?\M-& ?\M-:)
+  "List of prefix keys EXWM should forward to Emacs when in line-mode.
+
+The point is to make keys like 'C-x C-f' forwarded to Emacs in line-mode.
+There is no need to add prefix keys for global/simulation keys or those
+defined in `exwm-mode-map' here."
   :type '(repeat key-sequence)
   :get (lambda (symbol)
          (mapcar #'vector (default-value symbol)))
@@ -562,6 +566,7 @@ instead."
                      ;;
                      (memq event exwm-input--global-prefix-keys)
                      (memq event exwm-input-prefix-keys)
+                     (assq event (cdr exwm-mode-map))
                      (gethash event exwm-input--simulation-keys)))
         (setq mode xcb:Allow:AsyncKeyboard)
         (exwm-input--cache-event event))