Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the emacs command for a given keyboard shortcut?

Tags:

emacs

Is there a general way to do this? I'm looking for a function that accepts an arbitrary keyboard shortcut, and returns the corresponding function name.

like image 889
jhourback Avatar asked Sep 12 '25 05:09

jhourback


1 Answers

C-h k runs the command describe-key

Display documentation of the function invoked by KEY. KEY can be any kind of a key sequence; it can include keyboard events, mouse events, and/or menu events.

When calling from a program, pass KEY as a string or a vector.

like image 102
Tom Avatar answered Sep 15 '25 15:09

Tom