Created
January 4, 2019 17:52
-
-
Save ThomasAdam/833d5ff8e77df14bf18d0b8e7fcf4114 to your computer and use it in GitHub Desktop.
stumpwm show key presses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; display the key sequence in progress | |
(defun key-press-hook (key key-seq cmd) | |
(declare (ignore key)) | |
(unless (eq *top-map* *resize-map*) | |
(let ((*message-window-gravity* :bottom-right)) | |
(message "Keys: ~a" (print-key-seq (reverse key-seq)))) | |
(when (stringp cmd) | |
;; give 'em time to read it | |
(sleep 0.5)))) | |
(defmacro replace-hook (hook fn) | |
`(remove-hook ,hook ,fn) | |
`(add-hook ,hook ,fn)) | |
(replace-hook *key-press-hook* 'key-press-hook) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment