Sublime Forum

New key binding maps to the other key

#1

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?

0 Likes

#2

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

0 Likes

#3

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)

0 Likes

#4

[quote=“KonTrax”]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)[/quote]

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.

0 Likes

#5

I finally get things done. Actually, it is not as boring as I thought.
Here is my work if you are interested. github.com/bendwarn/ToggleShift

0 Likes