Sublime Forum

Binding

#1

why can’t i bing ‘space’ or other special keys? i need it with the command Mode

0 Likes

#2

You can bind to space like this:

<binding key=" " command="noop"/>

Let me know what other keys are giving you issues.

0 Likes

#3

‘+’ or plus

as in alt+plus or alt++

0 Likes

#4

If you’re binding it just by itself, you’ll want to use:

<binding key="+" command="noop"/>

If you’re binding it with a modifier, you’ll need:

<binding key="alt+keypad_plus" command="noop"/>
0 Likes

#5

Nope, I don’t want alt+keypad_plus I want alt+plus which is in a very different area of the keyboard.
I cannot imagine why alt+plus is not possible in sublime as alt-minus will do it and many other editors have no problems providing alt+plus.

The plus key is left of the return key of a geraman layout keyboard. May this be a reason?

Ha, I remeber times I had to use a french layout where the shift key is needed to type the ‘.’. Do the french write very long sentences because of this or ist it vice versa? Who cares…

0 Likes

#6

You may want to mention this next time :slight_smile:

It terms of mapping the buttons, Windows doesn’t distinguish between the plus key on a german keyboard, and the equals key on a US keyboard (US layout has no plus key, it’s just a shifted state of the equals key): both trigger a WM_KEYDOWN message with a VK code of 0xBB. The ideal situation would be for Sublime Text to allow it to be bound via ether Alt+Plus or Alt+Equals, but for the moment buttons may only have a single name, so to bind to plus on a keyboard with a german layout, you need:

<binding key="alt+equals" command="noop"/>

This works for me if I set my layout to German.

0 Likes

#7

Hey, it works. Are you scanning the VK codes on other keys, too?
I’m a little confused as ctrl-minus works as expected and the minus key is the neighbor of the right shift key.

0 Likes