tags:

views:

99

answers:

2

Just now I was fumbling around on the keyboard and saw a  appear in the emacs buffer.

How'd I do that?

That would be handy, if I could do it on purpose.

+5  A: 

You can hit C-h l (L) to see your last N keystrokes. The dump looks like:

<backspace> <right> C-x C-s <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <C-kp-8> <f12> <down> <kp-1> <f12> <down>
<kp-1> <C-kp-8> C-z C-h l

[back]

It's up to you to figure out which keystrokes go together to form a single command sequence, like the C-x C-s in the example.

To find out what a particular key sequence does, hit C-h k followed by the key sequence in question.

Dewayne Christensen
+5  A: 

Every editing mode has a help page, which you can see through C-h m (when you're in that mode) or C-h f <mode-name> when in another mode. The mode's help-page shows you the current key-bindings. Looking through the help-page for html-mode, I see C-c C-n is bound to sgml-name-char, which looks likely to perform the function you describe.

Aidan Cully