Sublime Forum

Table of Key Bindings

#1

Hello!

I have looked and looked and have not yet found a Sublime Text Package that can generate a table of existing key bindings, so I can look for “areas” of the keyboard that have not yet been used. Here is what I am looking for (I constructed this one by hand, from the Default (Windows).sublime-keymap that comes with Sublime Text build 4200).

If such a package is not available, I would like to write one to do this, as I would find it very useful for determining what key combinations are not yet used in my current Sublime Text run-time environment (and I presume others would too).

Towards that end, is there a way to programmatically access the current set of Key Bindings from within Sublime Text within a command? (I would like for a command to be able to see the current state of the key bindings that Sublime Text sees after all the applicable .sublime-keymap have been loaded, in the sequence they get loaded in.)

I have looked into the API and have not found any occurrences of the string “key” or “binding” that seem to apply to the live run-time key map, so I’m asking.

(Thanks to an earlier discussion about a similar topic, I’m aware that I can use sublime.find_resources('*.sublime-keymap'), followed by sublime.load_resource() and sublime.decode_value() to build that object myself in the same sequence as Sublime Text does. I was just wondering if it was already available somewhere.)

Kind regards,
Vic

1 Like

#2

Try one or both of these:

They are both good plugins with slightly different feature sets.

0 Likes

#3

Hi, @gbird!

Thank you for your input. I had seen both of those before I posted the above question. The 2nd one is closest, and I will have a look at it, if only to learn from his code (and hopefully some internal documentation) about how the author approached getting the data.

Kind regards,
Vic

0 Likes