Last active
May 23, 2020 17:50
-
-
Save esamattis/f1af601d7cac59bd772a0c7656103c23 to your computer and use it in GitHub Desktop.
Section (§) to Backtick with Karabiner-Elements on Finnish keyboards
This file contains 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
{ | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"rules": [ | |
{ | |
"manipulators": [ | |
{ | |
"description": "Section to Backtick (MS keyboard)", | |
"from": { | |
"key_code": "grave_accent_and_tilde" | |
}, | |
"to": [ | |
{ | |
"key_code": "equal_sign", | |
"modifiers": ["left_shift"] | |
}, | |
{ | |
"key_code": "spacebar" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"description": "Section to Backtick (laptop)", | |
"from": { | |
"key_code": "non_us_backslash" | |
}, | |
"to": [ | |
{ | |
"key_code": "equal_sign", | |
"modifiers": ["left_shift"] | |
}, | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
} | |
} | |
] | |
} |
Thanks for this!
I'm not sure if there's something funny on my machine/keyboard, but for me it works better if I replace:
"key_code": "right_arrow"
with
"key_code": "spacebar"
That way there's no magic cursor shift and it works more like a normal key press.
I actually changed it locally to spacebar
also. I'll update the gist!
Alternative: Just make the normal backtick button output the backtick used by programmers
{
"description": "backtick fix",
"manipulators": [
{
"from": {
"key_code": "equal_sign"
},
"to": [
{
"key_code": "equal_sign",
"modifiers": ["left_shift"]
},
{
"key_code": "spacebar"
}
],
"type": "basic"
}
]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add to
~/.config/karabiner/karabiner.json