I want to use the function to switch to other window when there are only 2 windows in emacs. I know that the shortcut is C-x o
, but I don't know which function that shortcut calls.
How do I determine the mapping between shortcut and function?
The describe-key
command (C-h k
) will tell you what command is bound to a given key sequence. To go the other way and find out what keys (if any) are bound to a command, use where-is
(C-h w
).
You can list all available key bindings using describe-bindings
(C-h b
).
As of Emacs 25, you can also use view-lossage
(C-h l
) to see the recent history of every key typed and the corresponding commands that were executed.
You'll notice these commands are all bound to the help map (C-h
). You might want to try C-h C-h
to see all the available help commands.
If you use helm
, you can try helm-descbinds
. It's pretty convenient, when you want to define your own bindings instead of using the preconfigured shortcuts.