Home Download Buy Blog Forum Support

New key binding maps to the other key

New key binding map to the other key

Postby bendwarn on Thu Apr 18, 2013 11:51 am

Hello, I want to customize my keymap to insert brackets and quotes without shift. I am going to use "keys": ["9", "9"] to approach the function, but I find that there are many contexts in default in order to fix every situation.

I can find and copy all to the new key binding, but I want to know if there is any convenient solution like { "keys": ["9", "9"], "command": "press_key", "args": {"characters": "("} } ?
Can we borrow the key binding in default and let it work like the lender without copying explicitly?
bendwarn
 
Posts: 6
Joined: Thu Apr 18, 2013 11:10 am

Re: New key binding maps to the other key

Postby KonTrax on Fri Apr 19, 2013 5:50 am

Don't have time atm but I'll see if I can give you a hand after work if someone else hasn't by then
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Re: New key binding maps to the other key

Postby KonTrax on Fri Apr 19, 2013 5:20 pm

I can not recall anything like simulated/virtual/"key-redirecting" keypress or what should call it so I believe copying is best for now. Well except using third-party software but that's when my interest dies. I prefer keeping my editor as independent as possible.
Not 100% sure as I have had a short break from plugin development for sublime and have the memory capacity of a goldfish.

Just an idea I got from your post, using multibind plugin could have all numeric keys toggle to output it's secondary or tertiary symbol on single click. (Note to self; put on totest list)
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Re: New key binding maps to the other key

Postby bendwarn on Mon Apr 22, 2013 5:28 am

KonTrax wrote:I can not recall anything like simulated/virtual/"key-redirecting" keypress or what should call it so I believe copying is best for now. Well except using third-party software but that's when my interest dies. I prefer keeping my editor as independent as possible.
Not 100% sure as I have had a short break from plugin development for sublime and have the memory capacity of a goldfish.

Just an idea I got from your post, using multibind plugin could have all numeric keys toggle to output it's secondary or tertiary symbol on single click. (Note to self; put on totest list)


Thank you. I can keep going on copy-paste now lol.

Firstly I also figured that Using a mode which can be turned on/off is best, and I prefer caps lock, which is the most intuitive, but it appears sublime cannot bind caps lock key or detect the caps state. Also, vintage cannot be used.

Inconvenience which baffles my double key method is conflict with [ and ', so I am glad to see multibind keep growing.
bendwarn
 
Posts: 6
Joined: Thu Apr 18, 2013 11:10 am

Re: New key binding maps to the other key

Postby bendwarn on Wed Apr 24, 2013 6:36 am

I finally get things done. Actually, it is not as boring as I thought.
Here is my work if you are interested. https://github.com/bendwarn/ToggleShift
bendwarn
 
Posts: 6
Joined: Thu Apr 18, 2013 11:10 am


Return to General Discussion

Who is online

Users browsing this forum: mlf and 36 guests