Reputation: 1068
I am trying to achieve Intellij like double shift navigation. I found that it is called "Sequence Key Bindings" for "Quick-open files".
Hence, I added this line in .sublime-keymap --- USER
{
"keys": ["shift", "shift"],
"command": "show_overlay",
"args": {"overlay": "goto", "text": "@"}
}
But it's not working. How can I do this?
Upvotes: 3
Views: 1108
Reputation: 41
Now in Sublime Text 4, Modifier keys can be uses as part of a key binding. Sublime Text 4 Changelog
So now! 🎉
{ "keys": ["shift", "shift"], "command": "show_overlay",
"args": { "overlay": "goto", "text": "@" } }
Upvotes: 4
Reputation: 4510
I don't think you can do this. shift
, ctrl
, alt
and super
are modifiers. You need at least one "normal" key (non-modifier).
As an alternative, here's what you could do:
{ "keys": ["g", "g"], "command": "show_overlay",
"args": { "overlay": "goto", "text": "@" } }
If you never type two g
at a time, then it's great, otherwise, change it :wink:
(What's going to happen is that the first g
will be inserted, but if you press a second time the g
, it will remove both of them and run the command)
Hope this helps!
Upvotes: 4