Sublime Forum

How can I do key binding for `\C-x-<any_character>`


Like in emacs I want to do keybinding for ctrl+x+<any_character>.

But sublimeText won’t capture ctrl-x

Following line actually over-writes into ctrl-d which is actually delete a character.
{ "keys": ["ctrl+x+d"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }

1 Like


I think you’ll find that even Emacs doesn’t really do C-x-d as if they can all be pressed in one sequence. Mashing all three keys at once is probably not going to do you any favors. However, viewed as a sequence, Sublime Text can do these things.

If you keys sequence reads:

"keys": ["ctrl+x", "d"]

Then if you press C-x then d (with no control modifier) you’ll get the sequence.

If you want to just keep holding Ctrl down, you could do:

"keys": ['ctrl+x", "ctrl+d"]

You will still need to lift your finger up from x to d though… you cannot literally do C-xd or something like that.

There does exist a good Emacs mimic mode in “Emacs Pro Essentials” which you can find on Package Control.