Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remap the home and end keys in macOS using Karabiner Elements
{
"rules": [
{
"description": "change home key to command + left_arrow",
"manipulators": [
{
"from": {
"key_code": "home"
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "change home key to command + left_arrow while presing shift (selection)",
"manipulators": [
{
"from": {
"key_code": "home",
"modifiers": {
"mandatory": [
"left_shift"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"left_command",
"left_shift"
]
}
],
"type": "basic"
}
]
},
{
"description": "change end key to command + right_arrow",
"manipulators": [
{
"from": {
"key_code": "end"
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"left_command"
]
}
],
"type": "basic"
}
]
},
{
"description": "change end key to command + right_arrow while presing shift (selection)",
"manipulators": [
{
"from": {
"key_code": "end",
"modifiers": {
"mandatory": [
"left_shift"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"left_command",
"left_shift"
]
}
],
"type": "basic"
}
]
}
]
}
@jasonwaters

This comment has been minimized.

Copy link
Owner Author

commented Oct 30, 2018

Update the rules section of ~/.config/karabiner/karabiner.json with the JSON array from this gist. Doing so remaps the home and end keys to work the way they work on pc/windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.