Sometimes, when I type quickly I do something that change the keyboard layout: the key that would produce <
now produces |
. Problem is that I don't know how I cause that and how to undo that! If I close and open again Emacs everything is fine, but I would like to avoid it. Any clue?
1 Answer
You can use C-h l
(command view-lossage
) to see the last few key sequences (including mouse actions) that you used, plus their associated commands.
C-h k C-h l
tells you:
view-lossage
is an interactive compiled Lisp function inhelp.el
.It is bound to
C-h l
,f1 l
,help l
,menu-bar help-menu whereami view-lossage
.
(view-lossage)
Display last few input keystrokes and the commands run.
For convenience this uses the same format as
edit-last-kbd-macro
.To record all your input, use
open-dribble-file
.
That last statement tells you how to record more than just the last few keystrokes. C-h f open-dribble-file
(or clicking the linked name in the previous help display) tells you:
open-dribble-file
is an interactive built-in function inC source code
.
(open-dribble-file FILE)
Start writing all keyboard characters to a dribble file called FILE.
If
FILE
isnil
, close any open dribble file. The file will be closed when Emacs exits.Be aware that this records ALL characters you type! This may include sensitive information such as passwords.
M-x command-history
to check what you might have activated by mistakeC-\
That's probably what you've typed by accident. You should be able to see that command in lossageF1 l
.