I've been using the Extend Mod by DreymaR on my Windows PC and has found it to be quite useful, but was unable to find a Mac version of it that works on OS X Sierra. I had then created a complex modifications file for Karabiner.
About the Extend Mod:
The Extend Mod is a modification of the Colemak layout that replaces the Caps Lock key with the Extend key, which allows a variety of functions (including cursor keys, mouse emulation, function keys, and etc.) to be executed without having to move your fingers away from the home row. More details can be found on the original topic. Personally, I found it to reduce finger travel by a significant amount and very useful while editing text and coding.
Code:
{
"title": "Extend Layer",
"rules": [
{
"description": "Extend Layer",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "f19",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "extend",
"value": 1
}
}
],
"to_if_alone": [
{
"key_code": "delete_or_backspace"
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "extend",
"value": 0
}
}
]
},
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "escape"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "1",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f1"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "2",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f2"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "3",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f3"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "4",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f4"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "5",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f5"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "6",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f6"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "7",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f7"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "8",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f8"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "9",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f9"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "0",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f10"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "hyphen",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f11"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "equal_sign",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f12"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "delete_or_backspace",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "tab",
"modifiers": [
"left_command"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "w",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"mouse_key": {
"vertical_wheel": -32
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "e",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"left_control"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "r",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"left_control"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "t",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"mouse_key": {
"y": -1536
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "y",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "home"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "u",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "page_up"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "o",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "page_down"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "p",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "open_bracket",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "escape"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "close_bracket",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "mission_control"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "backslash",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "print_screen"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "a",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_option"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "s",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"mouse_key": {
"vertical_wheel": 32
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "d",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "f",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "g",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"mouse_key": {
"y": 1536
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "end"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "semicolon",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_or_backspace"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "z",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "z",
"modifiers": [
"left_command"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "x",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "x",
"modifiers": [
"left_command"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "c",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "c",
"modifiers": [
"left_command"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "v",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "v",
"modifiers": [
"left_command"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "b",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "b",
"modifiers": [
"left_command"
]
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "comma",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"mouse_key": {
"x": -1536
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "period",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"mouse_key": {
"x": 1536
}
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
},
{
"type": "basic",
"from": {
"key_code": "space",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "enter"
}
],
"conditions": [
{
"type": "variable_if",
"name": "extend",
"value": 1
}
]
}
]
}
]
}
To install:
1. Install Karabiner. It is not necessary for Seil to be installed.
2. Copy the code into TextEdit, then save it as a .json file.
3. Put the file into ~/.config/karabiner/assets/complex_modifications
4. Open Karabiner, go to the Complex-Modifications tab, open the menu, and select 'Extend Layers'.
Note:
1. You must map the desired key to F19 in order to make it function as Extend.
2. If Extend is pressed alone, it functions as backspace.
Update 2019-05-21:
• Extend now functions as backspace if pressed alone.
• Fixed the broken Command + ZXCV shortcuts.
• Extend is now mapped to F19 instead of Caps Lock by default.
To do:
• Add the Extend2 layer and map it to F20.