Created
May 8, 2020 00:30
-
-
Save winny-/f17fd8d8bb411ac3b8c5b3db6eee6c63 to your computer and use it in GitHub Desktop.
This file contains 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
;; Via | |
;; https://github.com/stumpwm/stumpwm/wiki/Tips-And-Tricks | |
(defun show-key-seq (key seq val) | |
(message (print-key-seq (reverse seq)))) | |
(add-hook *key-press-hook* 'show-key-seq) | |
;; Via Ticks and Tricks (above) | |
(stumpwm:add-hook stumpwm:*destroy-window-hook* | |
#'(lambda (win) (stumpwm:repack-window-numbers))) | |
(defcommand toggle-show-keys () () | |
"Toggle echoing back keys in the message area." | |
(if (member 'show-key-seq *key-press-hook*) | |
(progn | |
(remove-hook *key-press-hook* 'show-key-seq) | |
(message "Hiding keys…")) | |
(progn | |
(add-hook *key-press-hook* 'show-key-seq) | |
(message "Showing keys…")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment