Sublime Forum

How to show command name binded to a certain key?

#1

How to show command name binded to a certain key?
For example, I want to know command name of ‘ctrl+o’,
but I can’t find method to do so.
Or, Is it possible to list table of key binding
such as 'Ctrl-h l ’ in Emacs?

1 Like

#2

The simplest way is to bring up the console and type:

sublime.log_commands(True)

then watch the output after pressing a key combination.

Alternatively, .sublime-keymap files is where key bindings are defined. You can look for those inside the Packages folder.

1 Like

#3

Thank you, guillermooo.

The simplest way is to bring up the console and type:

CODE: SELECT ALL
sublime.log_commands(True)

then watch the output after pressing a key combination.

According your hint, I found [menu: View > Show Console]
and it shows detail of command.

Alternatively, .sublime-keymap files is where key bindings are defined.
You can look for those inside the Packages folder.

I can’t find “Packages” folder under /Applications/Sublime\ Text\ 2.app/Contents/,
but I found that [menu: Sublime Text 2 > Preferences > Key Bindings - Default] opens
.sublime-keymap file.

Thanks.

0 Likes

#4
Preferences > Browse Packages

That will take you to the Packages folder. Keep in mind that there might be many .sublime-keymap files, not just the ones shown under Preferences.

0 Likes