Sublime Forum

Delay between keypresses for shortcut has decreased

#1

Recently I upgraded my OS to Ubuntu 19.10. Since then it seems that the delay between key presses is not working anymore.

For example, if I want to toggle the sidebar I have to press ctlr+k ctrl+b. If I am not doing this extremly fast it will not work at all but instead it will trigger the current build. (ctrl+b)

Is it possible that there is a new bug? Maybe I can work around this if I can change the setting for said delay, but I haven’t found it…

0 Likes

#2

The delay has always been hard-coded to 1500ms (1.5s). This hasn’t changed in recent versions of ST.
Which version of Sublime Text are you using and could you share any custom key bindings you’re using?

0 Likes

#3

I’m using build 3211.
I know that the delay is fixed. My guess is, that this has something to do with the OS upgrade. I have quite a few keybindings for sublime text, here is a gist for my keybindings.

Are there any settings that I can activate to see some log output?

0 Likes

#4

You can use sublime.log_input(True) in the console to view keys pressed, as well as sublime.log_commands(True) to see which commands were run.

0 Likes

#5

Is { "keys": ["ctrl+b"], "command": "unbound" } something you added to diagnose this key delay issue? If not does removing that key bindings fix it?

0 Likes

#6

Yes, I added this to fix this issue…

0 Likes

#7

I started the log output and it seems that the delay is indeed not working.
I see in the console that sublime is calling a command very very shortly after I pressed the first button…

0 Likes

#8

I’m using Xubuntu 19.10 and I timed it with a stopwatch, the 1.5 second delay works fine for me between pressing Ctrl+K and Ctrl+B in case that helps at all.

What command is shown? do you have any packages installed that bind to Ctrl+K alone?

0 Likes

#9

ctrl+k alone is not associated with any command.

Also, the problem happens everytime I am trying to use a command that has a chain of keys not only with ctrl+k ctrlk+b

0 Likes

#10

Which command is shown to run shortly after pressing the first button?

0 Likes

#11

No command is running. The console just shows that this: key evt: control+k.

The command log appears only after I hit the second chain. If I am hitting it very fast it says: command: toggle_side_bar if I am not fast enough I get this: command: unbound

0 Likes

#12

Could you try reverting to a freshly installed state?

0 Likes

#13

Here it is working! Thanks! I will reinstall my missing packages and (hopefully) find the one which is causing my issues…

0 Likes

#14

I’m having the same issue now, the ctrl+k, ctrl+b sequence is still toggling the sidebar, however it also triggers a build for me (ctrl + b), no matter how quickly the sequence is entered. Not sure what broke this behavior, but I upgraded to ST4 within the last month. Is reverting really the only option?

0 Likes

#15

Does it happen in safe mode? This is usually due to a plugin or customisation.

0 Likes

#16

Fwiw, this happens to me in Safe Mode too. It’s quite annoying. I hit Command K + B as quickly as possible and it starts trying to do a build. In Safe Mode, it says “no build system”, but clearly it wants to build.

I’m on Mac, version 4126.

0 Likes

#17

What gets logged in the ST console when you enable command and input logging with: sublime.log_input(True); sublime.log_commands(True)?

0 Likes

#18

Thank you. It turns out it was this issue, https://githubmemory.com/repo/duydao/Text-Pastry/issues/93.

The commands logged when hitting command k + b were,

command: toggle_side_bar
command: toggle_side_bar
plugin rewritten command: text_pastry_cancel
command: build
0 Likes