Sublime Forum

I can't type [ and ] in SublimeText2 now that I am on Windows 10... Anyone has an idea why?

#1

I have a new Windows 10 computer, and I can’t type [ and ] in SublimeText.
Nothing happens when I do! The { and the } braces work fine, and apparently, every other character.
Only [ and ] won’t work, but they work in other programs!
Here is the think: I have the French (Canada) keyboard, so to type the [, I press the right alt, and the key on the right of the P.
My guess is that this triggers a shortcut in SublimeText that perhaps, is now mapped to something else?
Do anyone have any ideas?

0 Likes

#2

You can open the Sublime Text console:

And enable the debug mode running the command:

sublime.log_input(True); sublime.log_commands(True); sublime.log_result_regex(True)

Now every time you press a key Sublime Text will print what it is understanding. For example:

>>> sublime.log_input(True); sublime.log_commands(True); sublime.log_result_regex(True)
chr evt: a (0x61)
command: open_auto_completion {"keystroke": "a"}
chr evt: s (0x73)
command: open_auto_completion {"keystroke": "s"}
chr evt: d (0x64)
command: open_auto_completion {"keystroke": "d"}
chr evt: f (0x66)
command: open_auto_completion {"keystroke": "f"}
chr evt: a (0x61)
command: open_auto_completion {"keystroke": "a"}
chr evt: [ (0x5b)
chr evt: { (0x7b)
key evt: control+a
command: select_all
key evt: backspace
command: hungry_backspace
key evt: control+v
command: paste
>>> sublime.log_input(False); sublime.log_commands(False); sublime.log_result_regex(False)

So you can open the Key bindings settings and correctly put the characters your keyboard is inputting:

Later to disable the debug mode you can run the command:

sublime.log_input(False); sublime.log_commands(False); sublime.log_result_regex(False)
1 Like