Sublime Forum

Unable to set shortcut for spanish keyboard

#1

Hi,

I’m thinking on moving to sublimetext for my c/c++ programming. First think I have tested is to change the current shortcuts keymap as some of them are set for US keyboard and not compatible or difficult to type for the Spanish one.

I have tried to set the toogle comment shortcut to use the ‘>’ symbol.

Then I have included the following lines in my Default Windows keymap - user:

        { "keys": "ctrl+>"], "command": "toggle_comment", "args": { "block": false } },
        {"keys": "ctrl+shift+>"], "command": "toggle_comment", "args": { "block": true } }
]

Despite in the menus it is displayed that the shortcuts are the one set, when I press the ctrl and ‘>’ key nothing happens. I have tried using the ‘.’ and it works. What is happening? Why is it not working with ‘>’?

Any help is really welcome.

See you

0 Likes

#2

If you enter sublime.log_input(True) in the Console, it’ll log the names of the keys as they’re pressed, so you can see what you need to bind to.

0 Likes

#3

Thanks… I have done what you suggest and here is the ouput:

chr evt: (0x1c) —> ctrl + <
for ctrl + shift + < nothing is shown. With alt, etc… nothing is shown. It is quite strange.
What do I have to put in my key settings?

Actually all other combinations for shortcuts displays key evt in stead of chr evt. Why is it that?

TA

Edit:
While typing other commands I have realized that SublimeText2 consideres that my keyboard is in English for shorcuts although it displays the correct characters in the screen (I have spanish keyboard):

Type ç --> chr evt: ç (0xe7)
type ctrl + ç —> key evt: control+/ (if I put my keyboard in english the ç key corresponds to the / -it is in shift+7 in spanish keyboard)
type --> chr evt: (0x60)
type ctrl + ` --> key evt: control+;

I think this is a bug… how can I set sublimetext to recognize my keyboard even for ctrl commands?

0 Likes

Key input not handled correctly
#4

Ignore the ‘chr evt’ output, just look at the ‘key evt’ output, and bind your commands to the keys it reports.

0 Likes

#5

ok… so I will do :wink: However as said, some combinations are not available (like ctrl <)

Thanks for your help.

0 Likes

#6

I have similar problems with my spanish keyboard. I’m pretty new to Sublime Text, but I began noticing some key combinations not working properly, suck as ctrl+/ for toggle comments (I need to press ctrl+ç instead). Any chance for this getting fixed soon? I imagine everyone with different keyboards is experiencing this issue, and it’s confusing.

Thanks! :smile:

0 Likes