Sublime Forum

Shortcuts only intermittently working?

#1

I’ve noticed today (without any changes to my machine / or Sublime packages that I’m aware of) that my shortcuts in Sublime are working only intermittently. I’m finding:

Ctrl+Shift+F - to pull up the find window works 1 in 5 times maybe
Ctrl+Shift+P - to pull up the command list isn’t working reliably either

I’ve put together a small recording, while you can’t see me pressing keys I am :slight_smile: Once of the things I’ve noticed is that when it isn’t going to work, once I’ve pressed ctrl and shift the caret disappears. While if the command is going to work it remains once I press the 2 keys.

Does anyone know what the cause could be / how I can fix this? I’m running:

Sublime Text 4: Build 4126
Ubuntu 20.04.4

0 Likes

#2

The first thing to check would be to open the Sublime Console (View > Show Console) and then enter sublime.log_input(True). That will make Sublime log the keys you press as it sees them

While logging is on and the console is visible, click in the file tab and press the keys to see if Sublime is seeing you press them but not responding; no log when you press a key means that something external to Sublime is eating the key before Sublime can respond.

If the logs show that the keys are registering but not doing anything, also do a sublime.log_commands(True), which causes Sublime to log commands as they execute, and then run the test again to see if any commands are triggering in response to the keys or not.

0 Likes

#3

That’s so odd, does it happen with a different keyboard? Not impossible that a key is sticking somewhere etc

0 Likes

#4

So I’ve confirmed that Sublime is not receiving the events :frowning:

key evt: ctrl+`
key evt: shift+ctrl+f
key evt: ctrl+`
key evt: shift+ctrl+f
key evt: ctrl+`
key evt: shift+ctrl+f
key evt: ctrl+`
key evt: shift+ctrl+f
key evt: ctrl+` 

This is when it’s working, I get no shift+ctrl+f when it doesn’t work. I’ve also confirmed it’s not the keyboard by checking with another machine. So unfortunately some Ubuntu setting :confused:

0 Likes

#5

There could be some global process that’s eating the keys, though the situation in which it does that is interesting since it works sometimes but not always.

Is it sensitive to what order you press down the modifier keys for example?

0 Likes

#6

Ah, indeed it is. Ctrl then Shift is fine. Shift then Ctrl however consistently causes the problem.

0 Likes

#7

Any idea how I might determine what process might be the culprit? I’m not really a Linux power user yet, so not sure how to diagnose the cause.

0 Likes

#8

What shortcut combination do you have set to change the keyboard language / keyboard layout?

0 Likes

#9

I’m not sure, how would I check that?

0 Likes

#10

Settings - Region and Language?
https://linuxconfig.org/how-to-add-and-switch-keyboard-layout-on-ubuntu-20-04-desktop

Wondering if the shortcut to do it can be disabled?

0 Likes

#11

Don’t think that’s the problem

0 Likes

#12

I’m not an Ubuntu user, but this sort of problems smells like something in the Window manager is doing to do you favours.

Some anecdotal evidence from this SO question suggests that it might be related to having Locate Pointer turned on in Universal Access under Pointing & Clicking. There are also a few other things mentioned in the other answers that might shine some light.

1 Like

#13

I’ve done so much searching, I’ve been reading on ways to report all the key binding captures etc that don’t work well. I’ve come across a dozen pages, but not hit that one… And changing that setting IS something I did recently. Almost certainly is the problem! Thanks so much @OdatNurd

0 Likes

#14

Make sure you have disabled the feature that highlights your mouse cursor when you press Ctrl. I had the exact same problem and this was the culprit.

Here’s some more info: https://askubuntu.com/a/1444290

0 Likes