Sublime Forum

Key Bindings - User does not appear

#1

Hi everyone
This is my first post and I hope someone can help me. I’m quite new to sublime text. I have found similar threads, but not exactly something that can answer my question, that’s why I opened up this new thread.

I use:
OS X 10.13.1
Sublime Text 3 Build 3143

My Problem:

Since I’m using a swiss-german keyboard I want to reassign a few hotkeys. Specifically the key binding for “toggle_comment” doesnt work. It is supposed to be “command + /”, which doesn’t work. This is not surprising, that’s why I wanted to change the key assignement.
So I looked at some guides in the web, and it should be possible with “Preferences -> Key Bindings”

That’s where my problem starts. I only have
“Key Bindings”
and not (as described in many guides)
“Key Bindings - Default”
“Key Bindings - User”

I can’t chose between “Key Bindings - User” and “Key Bindings - Default” like suggested in many threads / guides
Now if I click the button “Key Bindings” I have the following, where I entered my new key binding in the script to the right:

I entered the lines for the new “toggle_command” in the script to the right and saved.
However, nothing happens. Sublime Text doesn’t act any different, and I tried multiple key bindings like “super+q”, so they should work in theory.

So my question: Does anyone know what I have to do for sublime to accept the new key binding?
I did restart Sublime, I did restart the Macbook, that didn’t solve it. It’s like the new commmand in the file isn’t regarded at all by Sublime Text.

Thank you all in advance!
Darnol

0 Likes

#2

Build 3116 introduced side-by-side settings editing, so we no longer have separate menu entries for user and default settings.

0 Likes

#3

I had to edit this because I wondered about that backquote key definition. It is not listed in the documentation I put in below. I think we’re talking about the grave glyph on US 104 keyboards (and commonly used in markdown to provide fixed font text. Instead of putting in backquote you might just try putting in the key symbol itself (i.e. just type the character instead of using a descriptive term.) I don’t know if that’ll work for international, but it’s worth a shot.

http://docs.sublimetext.info/en/latest/reference/key_bindings.html

In particular, a useful couple of commands to try out when debugging keybindings is listed at the bottom. Namely:

sublime.log_commands(True)
sublime.log_input(True)

If you open up the console and type in these commands, you can see what Sublime Text sees when capturing the keystrokes and issuing a command.

0 Likes

#4

Thank you so much, wbond and Remi !!

Actually, Remi, your help solved the issue. Instead of typing “backquote”, i just pressed the button on my keyboard I wanted to assign, and that helped.
I think part of why I’m so confused is the keyboard mapping (because I use a swiss-german keyboard). I have generally troubles typing certain symbols because the shortcuts for US Keyboards are completely different.

However, for this issue at hand, consider it solved. Thanks again!

1 Like

#5

Glad that worked. That documentation link I put in there has all the known “word” variations for keys. While I was looking for the logging commands which I knew were on that page, it occurred to me that I didn’t see backquote there, which meant that it was either unsupported, or simply just needed to be typed rather than labeled.

Anyway, hopefully with that documentation and some work, you can come up with a shortcut scheme that works for you!

0 Likes