[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm 0a3dde0: Added option to have a key that ends exwm
[elpa] externals/exwm 0a3dde0: Added option to have a key that ends exwm-input-send-next-key
Sun, 14 Jul 2019 03:27:06 -0400 (EDT)
Author: Sebastian Wålinder <address@hidden>
Commit: Chris Feng <address@hidden>
Added option to have a key that ends exwm-input-send-next-key
* exwm-input.el (exwm-input-send-next-key): Accept an optional end key.
exwm-input.el | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/exwm-input.el b/exwm-input.el
index 22c8002..351820c 100644
@@ -845,11 +845,11 @@ button event."
-(cl-defun exwm-input-send-next-key (times)
+(cl-defun exwm-input-send-next-key (times &optional end-key)
"Send next key to client window.
EXWM will prompt for the key to send. This command can be prefixed to send
+multiple keys. If END-KEY is non-nil, stop sending keys if it's pressed."
(unless (derived-mode-p 'exwm-mode)
@@ -861,11 +861,17 @@ multiple keys."
(let ((exwm-input-line-mode-passthrough t))
- (setq key (read-key (format "Send key: %s (%d/%d)"
+ (setq key (read-key (format "Send key: %s (%d/%d) %s"
- (1+ i) times)))
+ (1+ i) times
+ (if end-key
+ (concat "To exit, press: "
+ (list end-key)))
(unless (listp key) (throw 'break nil)))))
(setq keys (vconcat keys (vector key)))
+ (when (eq key end-key) (cl-return-from exwm-input-send-next-key))
(defun exwm-input--set-simulation-keys (simulation-keys &optional no-refresh)
|[Prev in Thread]
||[Next in Thread]|
- [elpa] externals/exwm 0a3dde0: Added option to have a key that ends exwm-input-send-next-key,
Chris Feng <=