Please see the keycast and keypression package, which has options to display in a posframe, headline, or modeline. It’s a pretty well written package. This package was forked to clean up the command-log-mode package that is still ranking highly in a lot of search results.
Watch commands & key sequences in some or all buffers. Good for recording demos or annotating videos.
- Logs can be saved and contain command timestamps
- Filter commands or activate logging only in select buffers
- Side window buffer display
Until and unless MELPA is updated, configure your package manager (which should support pointing at specific repositories) to use this repo.
;; using elpaca (recommended to add a hash for reproducibility)
(use-package
:elpaca (command-log
:host github
:repo "positron-solutions/command-log"))
;; using straight use-package with custom recipe
(use-package command-log
:straight '(command-log
:type git :host github :repo "positron-solutions/command-log"))
Use the command-log-toggle
command. The use-package configuration below will
configure this command to log globally, including the minibuffer, and to
disable the global minor mode when you toggle while the buffer is visible.
Customize the command-log
group for more options.
(use-package command-log
:config
(setopt command-log-filter-commands '(self-insert-command) ; commands you don't care about
(setopt command-log-mouse t)
(setopt command-log-text t) ; print strings rather than streams of `self-insert-command'.
(setopt command-log-merge-repeats t) ; show repeat counts without making new entries
;; This following option and some related options can be powerful for
;; revealing how commands are delegating out to other commands, such as M-x
;; and ivy. Read the docs ;-)
(setopt command-log-merge-repeat-targets 'post-command)
You can reveal all commands temporarily by running [M-x]
command-log-toggle-show-all
. It overrides several behaviors to try to reveal
more.
There is also command-log-tail-dribble
if you need to see your inputs for
debugging. Don’t forget about simple view-lossage
and refreshing with g
.
Commands to toggle buffer showing and to turn everything off without doing it on every toggle are sorely needed. PR’s welcome!
All post-fork work is GPL licensed. This increasingly covers most of the package. The CI is MIT licensed for convenience. See CONTRIBUTING.org for information about submitting changes correctly.
This package is a fork of mwe-log-commands.el by Michael Weber <[email protected]> The link is broken, but the original commit indicates that it was GPL2+ licensed, including the other forks. Thanks to others who are in git history or appear in copyright notices.