diff options
author | Chris Feng <chris.w.feng@gmail.com> | 2016-09-22T11·10+0800 |
---|---|---|
committer | Chris Feng <chris.w.feng@gmail.com> | 2016-09-22T11·10+0800 |
commit | f96f565d548521a87e0f3a23bfab7f5b836e4640 (patch) | |
tree | 5b9bf6a9d37f226ff77a2468427d9fd52f461418 /exwm-input.el | |
parent | 43af6bb6a295fc843bd8b1f890cca1c246293e90 (diff) |
Add support for keyboard macro
* exwm-core.el (exwm--kmacro-map): New keymap used when executing keyboard macros. (exwm-mode): Use `exwm--kmacro-map' to override the default keymap. * exwm-input.el (exwm-input--on-KeyPress-line-mode): Send extra key events when defining keyboard macros.
Diffstat (limited to 'exwm-input.el')
-rw-r--r-- | exwm-input.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/exwm-input.el b/exwm-input.el index dd65b6e8f12f..8101cbd52882 100644 --- a/exwm-input.el +++ b/exwm-input.el @@ -454,7 +454,11 @@ This value should always be overwritten.") :propagate 0 :destination (slot-value key-press 'event) :event-mask xcb:EventMask:NoEvent - :event raw-data)))) + :event raw-data))) + ;; Make Emacs aware of this event when defining keyboard macros. + (when (and defining-kbd-macro event) + (set-transient-map '(keymap (t . (lambda () (interactive))))) + (exwm-input--unread-event event))) (xcb:+request exwm--connection (make-instance 'xcb:AllowEvents :mode mode |