Created
May 13, 2025 06:45
-
-
Save lukasszz/7888672e92bacb129a900056fe836f84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "MacOS Change Home/End keys to Command + Left/Right Arrow (start/end of line)", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "end", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": ["left_command"] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "end", | |
"modifiers": { | |
"mandatory": ["left_shift"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": ["left_command", "left_shift"] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "home", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": ["left_command"] | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "home", | |
"modifiers": { | |
"mandatory": ["left_shift"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": ["left_command", "left_shift"] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This configuration solves the common issue for Linux and Windows users who are accustomed to the Home and End keys moving the cursor to the beginning and end of the current line, respectively. On macOS, by default, these keys move the cursor to the start or end of the entire document, which can disrupt editing habits. The following Karabiner-Elements rule remaps Home and End to behave like on PC.