Home Download Buy Blog Forum Support

query keymapping ?

query keymapping ?

Postby pkshiu on Fri Jan 27, 2012 2:52 am

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.
pkshiu
 
Posts: 2
Joined: Fri Jan 27, 2012 2:46 am

Re: query keymapping ?

Postby jps on Fri Jan 27, 2012 3:38 am

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
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: query keymapping ?

Postby pkshiu on Fri Jan 27, 2012 2:16 pm

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.
pkshiu
 
Posts: 2
Joined: Fri Jan 27, 2012 2:46 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 19 guests