Home Download Buy Blog Forum Support

binding

binding

Postby vim on Wed Oct 28, 2009 7:21 pm

why can't i bing 'space' or other special keys? i need it with the command Mode
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: binding

Postby jps on Wed Oct 28, 2009 8:54 pm

You can bind to space like this:

Code: Select all
<binding key=" " command="noop"/>


Let me know what other keys are giving you issues.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: binding

Postby tgkeul on Thu Oct 29, 2009 9:27 pm

'+' or plus

as in alt+plus or alt++
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: binding

Postby jps on Thu Oct 29, 2009 10:03 pm

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

Code: Select all
<binding key="+" command="noop"/>


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

Code: Select all
<binding key="alt+keypad_plus" command="noop"/>
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: binding

Postby tgkeul on Thu Oct 29, 2009 10:22 pm

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...
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm

Re: binding

Postby jps on Fri Oct 30, 2009 1:31 pm

tgkeul wrote:german layout keyboard


You may want to mention this next time :)

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:

Code: Select all
<binding key="alt+equals" command="noop"/>


This works for me if I set my layout to German.
jps
Site Admin
 
Posts: 3071
Joined: Wed Mar 19, 2008 12:33 pm

Re: binding

Postby tgkeul on Sun Nov 01, 2009 9:12 pm

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.
tgkeul
 
Posts: 140
Joined: Tue Dec 02, 2008 9:35 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 20 guests