Sublime Forum

Key bind for arrow keys in sublime

#1

I use sublime text editor for writing code, and I want to set up a key binding for arrow keys, so I don’t need to move my right hand frequently. To do so, I added code in sublime-keymap:

[ { “keys”: [“alt+j”], “command”: “move”, “args”: {“by”: “characters”, “forward”: false} }, { “keys”: [“alt+l”], “command”: “move”, “args”: {“by”: “characters”, “forward”: true} }, { “keys”: [“alt+i”], “command”: “move”, “args”: {“by”: “lines”, “forward”:false} }, { “keys”: [“alt+k”], “command”: “move”, “args”: {“by”: “lines”, “forward”: true} }, ]

But, alt+j and alt+k are not working. Please help. I tried to key bind in VS code too, the same problem occurs. I am using OS Windows 10; the hotkeys defined by windows is creating this issue

0 Likes

#2

Your key bindings are working fine for me on Windows 10 and looking at the commands used, it seems to be proper. Try sublime.log_commands(True) & sublime.log_input(True) in the console to see whether the key combination actually matches what command you have set in your user keymap file.

0 Likes