Skip to content

Instantly share code, notes, and snippets.

@esamattis
Last active May 23, 2020 17:50
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 esamattis/f1af601d7cac59bd772a0c7656103c23 to your computer and use it in GitHub Desktop.
Save esamattis/f1af601d7cac59bd772a0c7656103c23 to your computer and use it in GitHub Desktop.
Section (§) to Backtick with Karabiner-Elements on Finnish keyboards
{
"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"
}
]
}
]
}
}
]
}
@esamattis
Copy link
Author

Add to ~/.config/karabiner/karabiner.json

@arokanto
Copy link

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.

@esamattis
Copy link
Author

esamattis commented Dec 19, 2019

I actually changed it locally to spacebar also. I'll update the gist!

@esamattis
Copy link
Author

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