Wilfred / helpful

A better Emacs *help* buffer
1.11k stars 62 forks source link

Can `helpful-key` show which key, key combo, or key sequence was pressed? #300

Open w9 opened 2 years ago

w9 commented 2 years ago

I really like the fact that describe-key says what key I pressed in emacs's kbd syntax

<next> runs the command scroll-up-command...

Whereas helpful-key does not

scroll-up-command is an interactive and natively compiled function...

This is sometimes very useful for identifying the kbd code for non-standard keys. For example, it took me a while to figure out that <next> is the kbd sequence for the "Page Down" key.

I'd appreciate if you can add this snippet into the helpful-key buffer. Please let me know if that's already possible. Thanks!

treed commented 2 years ago

Not the author, and it's not quite what you're asking for (in that it doesn't tell you which specific keybinding you asked about), but helpful-key does list all of the bindings to the command and the keymaps tthose bindings appear in, including <next> in global-map in the case of "Page Down".

In my case, it's the third section, after Signature and Documentation.

Hopefully this helps.

w9 commented 2 years ago

@treed Thanks. Sometimes this is enough but not always. For example, it is quite difficult to figure out that Ctrl + ` sends out C-@ in terminal emacs. If you never knew this and reads through the keymaps, you might be scratching your head why C-` is not in any of the keymaps listed.

treed commented 2 years ago

Ahh yeah, fair enough.