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.
This commit is contained in:
Chris Feng 2016-09-22 19:10:38 +08:00
parent 43af6bb6a2
commit f96f565d54
2 changed files with 36 additions and 1 deletions

View file

@ -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