Permalink
Browse files

male's code for displaying key sequences

  • Loading branch information...
1 parent b500f79 commit bf9dee6a2e92fea6f2160c37565a74072e367d36 root committed May 31, 2009
Showing with 14 additions and 0 deletions.
  1. +14 −0 .stumpwmrc
View
@@ -52,6 +52,20 @@
;; Theming
(load "/home/joel/repository/stumpwm-goodies/effects.lisp")
+;; Male's code for key sequence display
+(defun key-press-hook (key key-seq cmd)
+ (declare (ignore key))
+ (unless (eq *top-map* *resize-map*)
+ (let ((*message-window-gravity* :bottom-right))
+ (message "Key sequence: ~A" (print-key-seq (reverse key-seq))))
+ (when (stringp cmd)
+ ;; Give 'em time to read it.
+ (sleep 0))))
+(defmacro replace-hook (hook fn)
+ `(remove-hook ,hook ,fn)
+ `(add-hook ,hook ,fn))
+(replace-hook *key-press-hook* 'key-press-hook)
+
;; Swank
(load "/home/joel/repository/slime/swank-loader.lisp")
(swank-loader:init)

0 comments on commit bf9dee6

Please sign in to comment.