GNU Emacs
Emacs
Dashboard

10.2 Documentation for a Key

The help commands to get information about a key sequence are C-h c ( describe-key-briefly) and C-h k ( describe-key).

C-h c key displays in the echo area the name of the command that key is bound to. For example, C-h c C-f displays ‘ forward-char’.

C-h k key is similar but gives more information: it displays a help buffer containing the command’s documentation string, which describes exactly what the command does.

C-h K key displays the section of the Emacs manual that describes the command corresponding to key.

C-h c, C-h k and C-h K work for any sort of key sequences, including function keys, menus, and mouse events (except that C-h c ignores mouse movement events). For instance, after C-h k you can select a menu item from the menu bar, to view the documentation string of the command it runs.

C-h w command RET lists the keys that are bound to command. It displays the list in the echo area. If it says the command is not on any key, that means you must use M-x to run it. C-h w runs the command where-is.

Some modes in Emacs use various buttons (see Buttons in The Emacs Lisp Reference Manual) and widgets (see Introduction in Emacs Widgets) that can be clicked to perform some action. To find out what function is ultimately invoked by these buttons, Emacs provides the button-describe and widget-describe commands, that should be run with point over the button.