I have a lot of keybinding for too many commands and scripts, I am looking for options to avoid long shortcuts like Ctrl+Alt+Shift+F4 or Ctrl+K, C, L, E, A, R (yes, I am using that sequence), so I am thinking on use the multimedia keys for debugging, lest say something like:
Play for Go/Continue debugging
Stop for stop debugging
Pause for… well… pause debugging
Fwd for runs to the end or next breakpoint
I tried assigned them but seems like komodo doesn’t listen these keys, so…
Is there any way to use these multimedia keys on komodo?
This is a great question. I’ve never dug into that part of Komodo before. Looks like we can hack this in if you like though.
So this will add the appropriate keys to your prefs:
var _ = require("contrib/underscore");
var VKLabels = { "Volume_Down":"VK_VOLUME_DOWN",
"Volume_Up":"VK_VOLUME_UP",
"Volume_Mute":"VK_VOLUME_MUTE"};
var VKCodes = {0xB6: "Volume_Down",
0xB7: "Volume_Up",
0xB5: "Volume_Mute"};
_.extend(ko.keybindings.VKLabels, VKLabels);
_.extend(ko.keybindings.VKCodes, VKCodes);
Running that in a Userscript at start up would add them or you can copy/paste run it in the JS Console (View menu > Tabs & Sidebars > Console). Once you run the above, you SHOULD be able to hit the named keys in the keybindings prefs window, in the New Key Sequence field. I couldn’t figure out the play button as it didn’t seem to use a proper standard key on my keyboard.
I considered adding this to Komodo core but I don’t have time to test that it works on Linux, OSX and Windows, plus confirm that other keyboards don’t use other names/values (they shouldn’t…).