I have a 60% mechanical keyboard where the capslock works as an fn button. By pressing FN + i/j/k/l, it works as the arrow buttons.
I would like to replicate this behavior on the laptop's keyboard (for the sake when I don't have the keyboard with me), but by what I saw so far it won't work (sharpkeys and keytweak), so I had hoped to do it at least on the VS code, which is the place where I miss this at most.
I've tried to add it as keybinding on the keybindings.json, but I must be doing something wrong. Does anybody knows if it's possible and how to do it?
Here are some of the things I tried, and the one that "worked":
{
// "key": "shift+capslock shift+i", // works once at a time
// "key": "0x14 + i", // DOESN'T WORK
// "key": "VK_CAPITAL+i", // DOESN'T WORK
// "key": "VirtualKeyCode.VK_CAPITAL+i", // DOESN'T WORK
// "key": "oem_14 i", // DOESN'T WORK
// "key": "[CapsLock]+i", // DOESN'T WORK
// "key": "capsLock+i", // DOESN'T WORK
"key": "capsLock i", // Works one key at a time
"command": "cursorLeft",
"when": "textInputFocus"
},
As you clarified in the comments, an acceptable solution is that you press capslock (and then must release it), then press i to move the cursor one character at a time. I made the command cursorLeft
but you can make it whatever you want. It works whether caps are being locked or unlocked at the time.
The gif isn't the best at showing all the keystrokes, but (1) press capslock
, (2) release the button, and (3) press i
. Repeat.