Created
December 7, 2014 06:46
-
-
Save fgeller/2da26f1fb98ab4c68a42 to your computer and use it in GitHub Desktop.
Show key presses via dribble
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
(defun start-recording () | |
(interactive) | |
(setq auto-revert-interval 0.5) | |
(auto-revert-set-timer) | |
(when (file-exists-p "keys.log") (delete-file "keys.log")) | |
(delete-other-windows) | |
(split-window-vertically (- (window-height) 5)) | |
(other-window 1) | |
(nlinum-mode -1) | |
(find-file (expand-file-name "./keys.log")) | |
(toggle-truncate-lines -1) | |
(text-scale-adjust 3) | |
(other-window 1)) | |
(defun stop-recording () | |
(interactive) | |
(open-dribble-file nil) | |
(when (file-exists-p "keys.log") (delete-file "keys.log")) | |
(when (get-buffer "keys.log") (kill-buffer "keys.log")) | |
(delete-other-windows)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Requires http://www.emacswiki.org/emacs/AutoRevertMode