Skip to content

Instantly share code, notes, and snippets.

@numberoverzero
Created March 14, 2018 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numberoverzero/90d63340b07b0721a1356c34246142d3 to your computer and use it in GitHub Desktop.
Save numberoverzero/90d63340b07b0721a1356c34246142d3 to your computer and use it in GitHub Desktop.
Home/End bindings for Karabiner-Elements
{
"title": "Windows Keys",
"rules": [
{
"description": "Windows-style Home/End for non-iTerm applications",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "end"
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com.googlecode.iterm2"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "home"
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com.googlecode.iterm2"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "end",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"shift",
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com.googlecode.iterm2"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "home",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": [
"shift",
"command"
]
}
],
"conditions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com.googlecode.iterm2"
]
}
]
}
]
},
{
"description": "Windows-style Home/End for iTerm application",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "end"
},
"to": [
{
"key_code": "e",
"modifiers": [
"control"
]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com.googlecode.iterm2"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "home"
},
"to": [
{
"key_code": "a",
"modifiers": [
"control"
]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com.googlecode.iterm2"
]
}
]
}
]
}
]
}
@numberoverzero
Copy link
Author

put this in ~/.config/karabiner/assets/complex_modifications/windows-binding.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment