Sublime Forum

Allowing/Enabling Customised Arrow Keys in ST3

#1

I’m a Linux user, and I’ve just, by dint of enormous effort, figured out how to remap my arrow keys at the system level via the XKB binding system to Caps+h/j/k/l. However, Sublime Text 3 (paid) seems to completely ignore or block this system-level mapping - I’ve activated log_commands and it doesn’t show any command going through at all. Is it possible to map Caps+keys in Sublime, or just to stop Sublime intercepting the key mappings so that the keycodes can go through?

0 Likes

#2

Did you try to edit Key Bindings?

  1. Open Command Pallet
  2. Look for: Preferences Keybindings
  3. Look for “Up” and “Down” in the left view.
  4. Copy over to the right (user key bindings)
  5. Set a key binding you want.

The default looks like that:

    { "keys": ["left"], "command": "move", "args": {"by": "characters", "forward": false} },
    { "keys": ["right"], "command": "move", "args": {"by": "characters", "forward": true} },
    { "keys": ["up"], "command": "move", "args": {"by": "lines", "forward": false} },
    { "keys": ["down"], "command": "move", "args": {"by": "lines", "forward": true} },

0 Likes

#3

You should try sublime.log_input(True)

0 Likes

#4

Thanks guys, yes I’m aware of the Sublime keybinding settings but they don’t seem to allow caps as an input key - what I want is for sublime to get out of the way and accept the key mappings which every other application deals with just fine!

According to this fix for the Neo 2 keyboard Sublime incorrectly reads the hardware_keycode instead of the keyval, which sounds like it would be the root of this problem. Devs, any intention to fix this?

0 Likes

#5

And yes thanks, also tried sublime.log_input - this shows no input from the caps lock at all, further supporting the idea that it’s reading the hardware code instead of the mapped key value.

0 Likes

#6
1 Like

#7

Yes, this sounds a lot like the issue I was experiencing (and still do).

0 Likes