Sublime Forum

There seems to be a bug with my key bindings

#1

Mainly, this is to do with opening the command palette. I checked in the key binding files and even added the line for the command palette in the user defined file, exactly as it is in the default one. Still though, if I use the LEFT Ctrl, Shift, and then the P, most of the time nothing happens. If I continuously press this combination it might open, but probably not. If I use the right Ctrl and Shift then the P, it always opens. Obviously it recognises the left side as sometimes (rarely) it will open the command palette if I use the left side. Anyone have any idea what is going on here?
P.S. Please don’t ask me why I don’t just use the right keys to open the command palette. It bothers me to use them, I don’t know why.

THANKS IN ADVANCE

0 Likes

#2

As far as I’m aware, Sublime has no ability to distinguish between the left and the right set of modifier keys in key bindings, so it should work regardless of which ones you use.

Off the top of my head, the only things that come to mind are: dodgy keyboard, a keyboard layout issue (e.g. it thinking you’re typing in a different language and changing the keys around) or something external intercepting the keystroke before Sublime gets a chance to handle it.

As a test, you can open the Sublime console with Ctrl+` or View > Show Console from the menu, and then enter the following commands:

sublime.log_commands(True)
sublime.log_input(True)

Now press Ctrl+Shift+P both ways and see what the console tells you. You should see something like the following:

>>> sublime.log_commands(True)
>>> sublime.log_input(True)
key evt: shift+control+p
command: show_overlay {"overlay": "command_palette"}
key evt: shift+control+p
command: show_overlay {"overlay": "command_palette"}

When you’re done, you can run the same two commands again with False instead of True to turn off the logging, or just restart Sublime.

If you see nothing at all in the console when you press the keys and it doesn’t work, it means that Sublime isn’t seeing the keys at all, which could be either one of the keys not working correctly or something external. If the keyboard layout you’re using is not standard, Sublime will tell you what keys it thinks it’s getting, which might point to the source of the problem.

0 Likes

#3

I’ve already done that (Read in another post on another site). It only logs the right side of my keyboard, and the left only when it ends up actually working. As for dodgy keyboard, other commands work just fine.
Perhaps it is the language conflict, but I doubt it. I’ve set my language to Eng(U.S.) and it is the only option, apart from Greek.

0 Likes

#4

The same is happening to me. I use Ubuntu mostly, and there it all works fine, but now I got a desktop with another keyboard (using Windows) and it doesn’t work. I’m guessing it’s something related to Windows itself since this keyboard works fine on Ubuntu as well.

0 Likes