Laptop Edit and Arrow Keys

Image From Keychron
In the olden days, every computer keyboard had all the alphanumeric keys, a row of function keys, an inverted T arrangement of arrow keys, edit keys (page up, home, end, etc), and a number pad. Today there are many different keyboard sizes, with various combinations of all of these types of keys. Keyboard nerds know what a 60% keyboard is. The rest of us call it a laptop keyboard. I use the editing keys a lot when typing at my desk with a full size keyboard, and I really miss them when using my laptop. Inspired by Brett Terpstra’s Home Row Arrow Cluster, I decided to see if I could figure out a solution.
I use a Macbook Air, so my approach is only useful for Mac users. Like Brett, I decided to use Karabiner-Elements, an outstanding low-level keyboard customizer. In Brett’s implementation, you hold down the ; with your pinky, and then use I J K L for the arrow keys.
That feels uncomfortable to me, and I wanted to be able to use P and ; for Page Up and Page Down. I wanted something where I could enter an edit key mode, then have the keys work as arrows and edit keys, then leave the mode and they go back to normal. Kind of like how the Num Lock key works. I can’t use Num Lock, because Apple laptops and keyboards don’t have it. In it’s place is the Clear key, which nobody uses because nobody knows what it does.
While experimenting with several keystroke options I discovered I was already using them for something else. Funny how your fingers know to type a thing, but your brain can’t remember all the things you know how to type. I finally settled on using ⌃+Delete to activate and de-activate edit mode.
Once in edit mode, I had to decide which keys to use for arrow keys and edit keys. I also experimented with this a lot. On my full size keyboard, I move my right hand over to use the arrow keys, so I wanted to use keys on the right hand side of the keyboard. I use my left hand for the modifier keys, so when I want to select backwards by word I use my left hand to press and hold ⌥+⇧ and then use my right hand to repeatedly press Left Arrow. I want to be able to do a similar thing on my laptop.
I ended up with the following keys:
Key | Function |
---|---|
I | Up Arrow |
J | Left Arrow |
K | Down Arrow |
L | Right Arrow |
U | Home |
O | End |
N | Delete |
Y | Page Up |
H | Page Down |
I configured I J K L for the arrow keys, in a similar configuration to the gaming W A S D but on the right hand. Because I exclusively used Unix and Linux before ever using Windows or MacOS, I have Home and End move to the beginning and end of a line. U and O are logically positioned for those actions. I originally had H for Delete, but changed it to N so I can have Y and N for Page Up and Page Down.
To implement this in Karabiner, you need to create a new complex rule, and paste in this JSON:
{
"description": "Control-Delete toggles 60% edit mode (I/J/K/L → ↑/←/↓/→, U/O → Home/End, N → Delete, Y/H → PageUp/PageDown)",
"manipulators": [
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 0
}
],
"from": {
"key_code": "delete_or_backspace",
"modifiers": { "mandatory": ["control"] }
},
"to": [
{
"set_variable": {
"name": "sixty_edit_mode",
"value": 1
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "delete_or_backspace",
"modifiers": { "mandatory": ["control"] }
},
"to": [
{
"set_variable": {
"name": "sixty_edit_mode",
"value": 0
}
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "up_arrow" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "down_arrow" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_arrow" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "right_arrow" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "u",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "home" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "o",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "end" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "n",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "delete_forward" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "y",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "page_up" }],
"type": "basic"
},
{
"conditions": [
{
"name": "sixty_edit_mode",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "page_down" }],
"type": "basic"
}
]
}
If these keys don’t work for you, and you are handy with JSON, you can probably figure out how to edit this.
If you aren’t handy with JSON or aren’t a Karabiner expert, paste the code above into your favorite chatbot, tell it this is a Karabiner-Elements complex rule, and use plain english to describe what you want to change. It will do a pretty good job of making the changes for you.