mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-27 13:07:59 +01:00
Fix `exwm-input-set-simulation-key'
* exwm-input.el (exwm-input--read-keys): Return nil on empty input so that `exwm-input-set-simulation-key' can ignore it. (exwm-input-set-simulation-key): Improve prompt.
This commit is contained in:
parent
5a43dbecc7
commit
3c8b395058
1 changed files with 5 additions and 3 deletions
|
@ -976,7 +976,8 @@ Notes:
|
||||||
(key-description (vector stop-key))
|
(key-description (vector stop-key))
|
||||||
(key-description keys)))
|
(key-description keys)))
|
||||||
keys (vconcat keys (vector key))))
|
keys (vconcat keys (vector key))))
|
||||||
(substring keys 0 -1)))
|
(when (> (length keys) 1)
|
||||||
|
(substring keys 0 -1))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun exwm-input-set-simulation-key (original-key simulated-key)
|
(defun exwm-input-set-simulation-key (original-key simulated-key)
|
||||||
|
@ -987,10 +988,11 @@ ends unless it's specifically saved in the Customize interface for
|
||||||
`exwm-input-simulation-keys'."
|
`exwm-input-simulation-keys'."
|
||||||
(interactive
|
(interactive
|
||||||
(let (original simulated)
|
(let (original simulated)
|
||||||
(setq original (exwm-input--read-keys "Original keys" ?\C-g))
|
(setq original (exwm-input--read-keys "Translate from" ?\C-g))
|
||||||
(when original
|
(when original
|
||||||
(setq simulated (exwm-input--read-keys
|
(setq simulated (exwm-input--read-keys
|
||||||
(format "Simulate %s as" (key-description original))
|
(format "Translate from %s to"
|
||||||
|
(key-description original))
|
||||||
?\C-g)))
|
?\C-g)))
|
||||||
(list original simulated)))
|
(list original simulated)))
|
||||||
(exwm--log "original: %s, simulated: %s" original-key simulated-key)
|
(exwm--log "original: %s, simulated: %s" original-key simulated-key)
|
||||||
|
|
Loading…
Reference in a new issue