Sublime Forum

Alphabetic character keys stuck

#1

I have a problem somewhat similar to this: Can't type anything but tabs and newlines. I’m using Sublime version 3.1.1, build 3176 on linux.

After a few minutes of typing, the alpha character keys (a-z & A-Z) become “stuck.” They aren’t echoed to the screen until I press the spacebar, or a comma or a period. (So for example, if I type “THE” I see nothing on the screen until I press the space bar and then "THE " appears on the screen all at once.) All the non-character keys like the navigation keys, number keys (0-9), etc, function normally.

The problem is intermittent and only affects the current Sublime Text window. No other application is affected and while the problem is going on the keyboard functions normally in every other window and application running at the same time. If I open a second instance of Sublime it will function normally for a few minutes and then it too will develop the same problem. Closing an affected window and restarting always clears the problem - for awhile. The syntax and encoding of the files I’m editing doesn’t seem to have anything to do with the problem.

I’ve tested with a clean install - a fresh ~/.config/sublime-text-3 with no plugins - but that doesn’t fix the problem. I’ve also tried with different keyboards, which makes no difference either. Watching with sublime.log_input(True) in the console shows that once the alpha keys become stuck, no “chr evt” associated with the characters I’m typing will appear until I press the space bar, comma or period. (sublime.log_commands(True) shows nothing unusual.)

The problem developed after I upgraded to Ubuntu 18.04. (I’m using xfce.) I’ve tried switching display drivers, different keyboard layouts, tired with MATE in place of xfce, stopped various daemons, made sure no accessibility features are running, etc. I’m reporting the problem here because Sublime Text is the only application affected.

Thanks!

0 Likes

#2

I’ve done a bit more testing. Running xinput list reveals the X input device id for my keyboard. Then, xinput test [id#] let’s me watch the X keypress events as I enter text into a Sublime window. When the keyboard is “stuck,” the keypress events are being reported by xinput, but they are not being echoed in the Sublime window.

I also tested with xdotool. This let’s you send keystrokes to a window from the command line. For example, xdotool windowactivate --sync [window id#] key q w e r t y sends “qwerty” to the Sublime window. When the window is stuck, the strings sent to the Sublime window are not being echoed. (Until they are followed by one of the not stuck keys, like a number key or the spacebar.)

I think this means that the character keystrokes are being sent to Sublime, but Sublime isn’t processing them.

0 Likes