13

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?

3 Answers 3

22

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.

1

Just got it, I could use the function describe-bindings.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.