diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2018-02-20T13·57+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2018-02-20T13·57+0800 |
commit | 7d4c57a6abc6bc724beaffb9d4f91971f9a62426 (patch) | |
tree | 98053017cb97fd63827069692fcc1e0a1721917d /exwm-config.el | |
parent | 5c5729c0d4832a870a928d6d7cc2f990a7e8f649 (diff) |
Add Customize interface for simulation keys
* exwm-input.el (exwm-input-simulation-keys): New user option for setting simulation keys. (exwm-input--init): Initialize simulation keys from this variable. * exwm-input.el (exwm-input--simulation-prefix-keys) (exwm-input--on-KeyPress-line-mode) (exwm-input--update-simulation-prefix-keys) (exwm-input-set-simulation-keys, exwm-input-set-local-simulation-keys) (exwm-input-send-simulation-key): `exwm-input--simulation-keys' is now a hash table storing both simulation keys and prefix keys. (exwm-input--unset-simulation-keys): Clear the hash table. (exwm-input--exit): Use `exwm-input--unset-simulation-keys'. * exwm-core.el (exwm--kmacro-map, exwm-mode-menu): Adapt to the change of `exwm-input--simulation-keys'. * exwm-config.el (exwm-config-default): Update the example.
Diffstat (limited to 'exwm-config.el')
-rw-r--r-- | exwm-config.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/exwm-config.el b/exwm-config.el index a434fe8d90ff..5742cac18745 100644 --- a/exwm-config.el +++ b/exwm-config.el @@ -52,17 +52,17 @@ (interactive (list (read-shell-command "$ "))) (start-process-shell-command command nil command))) ;; Line-editing shortcuts - (exwm-input-set-simulation-keys - '(([?\C-b] . left) - ([?\C-f] . right) - ([?\C-p] . up) - ([?\C-n] . down) - ([?\C-a] . home) - ([?\C-e] . end) - ([?\M-v] . prior) - ([?\C-v] . next) - ([?\C-d] . delete) - ([?\C-k] . (S-end delete)))) + (setq exwm-input-simulation-keys + '(([?\C-b] . [left]) + ([?\C-f] . [right]) + ([?\C-p] . [up]) + ([?\C-n] . [down]) + ([?\C-a] . [home]) + ([?\C-e] . [end]) + ([?\M-v] . [prior]) + ([?\C-v] . [next]) + ([?\C-d] . [delete]) + ([?\C-k] . [S-end delete]))) ;; Enable EXWM (exwm-enable) ;; Configure Ido |