Home Download Buy Blog Forum Support

How to show command name binded to a certain key?

How to show command name binded to a certain key?

Postby kwatch on Thu Feb 09, 2012 11:23 am

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?
kwatch
 
Posts: 2
Joined: Thu Feb 09, 2012 11:16 am

Re: How to show command name binded to a certain key?

Postby guillermooo on Thu Feb 09, 2012 11:45 am

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.

Alternatively, .sublime-keymap files is where key bindings are defined. You can look for those inside the Packages folder.
guillermooo
 
Posts: 727
Joined: Thu Jul 23, 2009 9:06 am

Re: How to show command name binded to a certain key?

Postby kwatch on Thu Feb 09, 2012 2:06 pm

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.
kwatch
 
Posts: 2
Joined: Thu Feb 09, 2012 11:16 am

Re: How to show command name binded to a certain key?

Postby guillermooo on Thu Feb 09, 2012 3:58 pm

Code: Select all
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.
guillermooo
 
Posts: 727
Joined: Thu Jul 23, 2009 9:06 am


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 7 guests