Sublime Forum

Can't close square brackets on french keymap

#1

Hi,

WHenever I input a ‘]’ character, on C++ code, ST2 takes me somewhere else on another file but does not input the pressed char.
I disabled the keybinds to ‘]’ but I still can’t input this key.
Turning off all automatch related options I found did not solve this.
Any idea ? Am I the only one getting this ?

0 Likes

#2

please help, it’s really annoying, I may add I use a french keymap.
And here is my config :

{ "auto_complete_selector": "source", "auto_indent": true, "auto_match_enabled": false, "auto_complete": false, "caret_style": "wide", "color_scheme": "Packages/Color Scheme - Default/LAZY.tmTheme", "detect_indentation": false, "drag_text": false, "ensure_newline_at_eof_on_save": true, "highlight_line": true, "highlight_modified_tabs": true, "indent_to_bracket": true, "rulers": [100], "shift_tab_unindent": true, "smart_indent": true, "tab_completion": false, "tab_size": 2, "translate_tabs_to_spaces": true, "trim_automatic_white_space": true, "trim_trailing_white_space_on_save": true }

With a stock config, when I input a ‘’ it automatically adds an ‘]’ but if I press ‘]’ it does not do anything, I mean it does not moves my cursor after it. If I try to add a single ‘]’ anywhere, it does not input any char at all…
If fails on all types of files, not just C++

EDIT : If I switch my keyboard to QWERTY / english map all works as expected.
It may be related to the ‘]’ char having to be pressed as a combination of Alt Gr + ) on a french keyboard.

0 Likes

#3

In the ST2 console type:

sublime.log_input(True) sublime.log_commands(True)
This activate the output of keyboard events and executed commands to the console.

0 Likes

#4

Thanks for your help.

First of all, the keybind for the console does not work… It relies on ctrl + alt + 7 on a french keyboard (I did view->show console of course then)
so, me typing “a[0]” gives :

chr evt: a (0x61) key evt: control+alt+5 chr evt: (0x5b) chr evt: 0 (0x30) key evt: control+alt+ command: jump_back

I have no idea why ‘]’ triggers “key evt: control+alt+” …
“ctrl + alt + 7” the console bind outputs nothing at all in the console.

Found the culprit : it’s the ctags plugin.
BUT
it’s not

{ "command": "navigate_to_definition", "keys": "ctrl+alt+]" ] },
that is messing up, but

{ "command": "jump_back", "keys": "ctrl+alt+" ] },

if I remove only the one about ‘’ it works again even though it’s the ‘]’ that has problems…

So almost fixed for this case, but keymap-independant bindings are not in general.

0 Likes