Sublime Forum

[Solved] Sublime 3 and 4, unable to type alphanumeric but able to use modifier, numpad...need help resolving

#1

Hi all,

A friend of mine recently came up with this problem. So far, it’s only happening to her system and no one had any similar complaints. These Sublime instances are ran on Linux (I think my organization still uses RedHat Rhel 7.9 via VM).

Problem description:

  • My friend has been unable to type alphanumerics (the main segment of the keyboard, including “shift+<number row>”, capital letters).
  • Space and enter still works; I assume other similar modifier keys still work as well.
  • Entering numbers from the numpad still works.
  • Opening command palette still works but she can’t alphanumeric into it (e.g. “install package”)
  • The same behavior occurs in Sublime 4 (Build 4192) and Sublime 3.
  • The same pattern occurs from her laptop keyboard or an attached, regular keyboard.
  • Typing in terminal works without issues.
  • Typing in VIM works without problems.

Attempts to fix:

  • Tried the console, saw some errors from “Highlight” package.
    • Tried to de-activate via “ignored_packages”, did not work.
    • Tried to delete, did not work.
  • Checked if “Vintage” is activated, it was not.
  • Tried to start fresh (“removed” her settings directory), did not work.
  • Tried to restart VM, did not work.

Any help in trying to fix this? Or is this likely NOT a Sublime “problem”? But if so, it’s rather weird that it’s only happening to her Sublime instances (3 or 4)…

TYIA!

0 Likes

#2

Does it still happen in safe mode? What desktop environment are you using?

Are you able to paste? If so you can paste sublime.log_input(True) into the console to see if Sublime Text is receiving input events.

0 Likes

#3

Thanks bschaaf!

The way her system is set up currently is (organization’s “standard”): Windows 10 laptop -> Windows 10 VM (VMWare Horizon) -> Linux "terminal" (via MobaXTerm SSH) -> Sublime 3/4 (Linux).
I think the Linux version we have is still RedHat Rhel 7.9 but I will update this if our IT has recently updated them.

I asked her to do your suggested stuff and yes, it still happens in safe mode. Copy paste works fine–just the alphanumeric portion of the keyboard (if the keyboard has a numpad, those work fine too).

We then did the sublime.log_input(True) in the console and definitely saw some ?interesting behavior (see chunk below). Note that I obfuscated the username ("[user]") for privacy’s sake.

As seen from the key events, backspace, space, enter, numpad numbers work fine. However, when she tries to type the letters or numbers using row1 ("!", “?”, etc) using laptop or external keyboard, nothing is registered (as evident from the absence of “events” registered in the console). We tried similarly in Sublime 3 (but without safe-mode) and the same thing occurs.

Also weirdly, this seems to happen only to her and only in Sublime (3 or 4)…

startup, version: 4192 linux x64 channel: stable
SAFE MODE - overriding packages, state and cache paths
executable: /opt/sublime_text/sublime_text
application: /opt/sublime_text
working dir: /home/[USER]
packages path: /home/[USER]/.config/sublime-text-safe-mode/Packages
state path: /home/[USER]/.config/sublime-text-safe-mode/Local
zip path: /opt/sublime_text/Packages
zip path: /home/[USER]/.config/sublime-text-safe-mode/Installed Packages
ignored_packages: ["Vintage"]
generating syntax summary
generating meta info summary
pre session restore time: 7.08069
startup time: 7.2975
first paint time: 7.37271
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.html_print
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.keymap
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
plugins loaded
reloading settings Packages/User/Preferences.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
>>> sublime.log_input(True)
key evt: backspace
key evt: backspace
key evt: backspace
key evt: backspace
chr evt:   (0x20)
chr evt:   (0x20)
chr evt:   (0x20)
key evt: backspace
key evt: backspace
key evt: enter
key evt: keypad1
chr evt: 1 (0x31)
key evt: keypad2
chr evt: 2 (0x32)
key evt: keypad3
chr evt: 3 (0x33)
key evt: keypad4
chr evt: 4 (0x34)
0 Likes

#4

I’m still confused at the environment, is ST running side a remote X-server on the windows VM?

It looks like ST’s not receiving the input events. Could you try running xev to see if events are properly getting sent? Could you also try another GTK3 app like gedit?

0 Likes

#5

My apologies, I’m actually not a dev nor IT so I don’t really know what is technically a desktop environment.

Based on your inference, yes, I think what you’re describing is what’s going on (ST running inside remote Xserver on Windows VM).

Your description actually made me try some other program that is running inside the remote Xserver and it behaves similarly to what’s going on with Sublime.

We don’t have gedit but we do have xev. The output produced were:

# -------- pressing "Enter" key
KeyPress event, serial 33, synthetic NO, window 0x200001,
    root 0xf3, subw 0x0, time 173731218, (161,-15), root:(201,50),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x200001,
    root 0xf3, subw 0x0, time 173731218, (161,-15), root:(201,50),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

# --------- pressing numpad "1"
KeyPress event, serial 33, synthetic NO, window 0x200001,
    root 0xf3, subw 0x0, time 173737562, (161,-15), root:(201,50),
    state 0x0, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x200001,
    root 0xf3, subw 0x0, time 173737625, (161,-15), root:(201,50),
    state 0x0, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

# ----------------- presssing letter "a" 
KeyPress event, serial 33, synthetic NO, window 0x200001,
    root 0xf3, subw 0x0, time 173741765, (161,-15), root:(201,50),
    state 0x0, keycode 8 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x200001,
    root 0xf3, subw 0x0, time 173741765, (161,-15), root:(201,50),
    state 0x0, keycode 8 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Looking at the above and comparing it with my working system, it appears that somehow her letters are registering as Mode_switch. It appears also that this is more of an Xserver problem instead of Sublime exclusively.

Any help debugging or pointing to where/what to debug will be appreciated but I will forward these findings to our organization’s IT team so they can address this.

Really appreciate your patience and help!

0 Likes

#6

Sorry, I don’t have any concrete idea other than checking ~/.Xmodmap. It looks like a is bound to a modifier key. This is certainly not an issue with Sublime Text.

0 Likes

#7

I agree; we originally thought this could be a Sublime issue since we thought it only occurred with her Sublime.

Nonetheless, your questions and suggestions gave us the breakthrough we needed and we really appreciate it!!

I’ve marked your xev suggestion as the “solution” and this thread can be closed.

Again, really appreciate the help and patience :smile:

1 Like