Sublime Forum

Query keymapping?

#1

Is there a way either interactively or via api’s query a key sequence? i.e. “let me type some key sequence” and “tell me what command this is mapped to”?

I am coming from emacs and I often use the “describe-key-briefly” command to see what a key sequence does. It is a quick way to learn the editor.

Thanks,
P.K.

0 Likes

#2

The closest thing is entering sublime.log_commands(True) and/or sublime.log_input(True) in the console: the former will print command names as they’re triggered, and the latter will show you the names of keys as they’re pressed

0 Likes

#3

Thanks for the tip. That helps.

Depending on how you implement the input process it may be really hard to expose the functionality but it will really be nice for newbie to have a way to do a “describe-key” type query! Another thing that maybe useful is a way to automatically query and then display a key binding map sorted both by key names and by function names? If I can get to them via the API I’ll be more than happy to write a plug-in to do this.

Thanks for a great piece of software. After all these years you may convince me to switch from emacs!

P.K.

0 Likes