Skip to main content

Apple Mac

Required software

Configuration

Because we want to avoid any possible conflicts with keyboard shortcuts defined by other applications we will use the key combination: Ctrl + Option + Shift + Command as our modifier.

We can then define all our global shortcuts based on this modifier.

Since CAPS lock is often not used by people and is positioned such that it is easy to reach we can remap CAPS-LOCK to Ctrl + Option + Shift + Command.

The result is that we now have our easy-to-reach modifier key that we can use to define global shortcuts that are unlikely to override shortcuts defined in the operating system or in other applications.

Armed with the above modifier we can now create shortcuts that map H, J, K, L to the arrow keys allowing navigating in any application by holding down caps-lock.

Configure CAPS-Lock

  1. Open Karabiner Elements and add the following configuration.
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift.",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": ["left_command", "left_control", "left_option"]
}
],
"type": "basic"
}
]
}

Setup shortcuts.

  1. Open Karabiner Elements and add the following configuration to map H, J, K, L with our special caps-lock modifier to the arrow keys.
{
"description": "Change shift+command+control_option to arrow keys",
"manipulators": [
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"left_shift",
"left_command",
"left_control",
"left_option"
],
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"left_shift",
"left_command",
"left_control",
"left_option"
],
"optional": ["any"]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"left_shift",
"left_command",
"left_control",
"left_option"
],
"optional": ["any"]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"left_shift",
"left_command",
"left_control",
"left_option"
],
"optional": ["any"]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
}