Karabiner (and friends) tips and tricks

I’m starting this thread as a place for people to share cool Karabiner Elements tricks. I’ll be posting a few of my own on the blog and will link them here, but I wanted a place for readers to contribute their own. This thread doesn’t have to be limited to just Karabiner, feel free to drop in BetterTouchTool and Keyboard Maestro (and DefaultKeyBindings.dict) tricks, too, especially if they work in tandem with a Karabiner trick!

1 Like

Here’s the first post in the latest series:

Would be very convenient if not for the fact that this won’t work on a Dutch keyboard (which is just an International English keyboard with an additional €-sign on the ‘2’-key). Well I guess technically it would work but the keys are placed differently: the backslash key lives next to the Return-key, making it almost impossible to use two or three fingers to hit the keys.
Screenshot 2025-03-26 at 14.34.17

You could probably actually make it work with the return key, but you wouldn’t want to add the double tap detection as it would cause a delay on a commonly-used key. But I can’t think of any situations where you’d hold the return key along with other keys, so it makes sense as an additional modifier.

1 Like

Here’s the second installment. I’m running into some issues with key repeat on this that I need to solve…

I’m going to give it a try.

This is better than the previous arrow cluster solution. I found out I can’t use the quote key as a modifier as when typing contractions I tend to hit keys fast enough that the quote was being caught when it was incidentally pressed with another key, and then I don’t get a quote at all. So I had to nix that part of the setup, giving up on having home/end/pgup/pgdown functionality on the home row. Not a big deal.

Here’s one from me addressing something very specific

Bear (Markdown app) doesn’t have a built-in hotkey to toggle its sidebar. You can do ctrl+1 to hide sidebar but not to ‘toggle’ it per se. Similarly you can do Ctrl+3 to show sidebar. Very bad implementation in my opinion!

So anyway, I wrote this karabiner modification to fix it:

{
    "description": "Toggle sidebar in Bear",
    "manipulators": [
        {
            "conditions": [
                {
                    "name": "Cmd+Shift+S_toggle",
                    "type": "variable_unless",
                    "value": true
                },
                {
                    "bundle_identifiers": [
                        "^net\\.shinyfrog\\.bear$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "s",
                "modifiers": { "mandatory": ["left_command", "left_shift"] }
            },
            "to": [
                {
                    "key_code": "1",
                    "modifiers": ["left_control"]
                },
                {
                    "set_variable": {
                        "name": "Cmd+Shift+S_toggle",
                        "value": true
                    }
                }
            ],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "name": "Cmd+Shift+S_toggle",
                    "type": "variable_unless",
                    "value": false
                },
                {
                    "bundle_identifiers": [
                        "^net\\.shinyfrog\\.bear$"
                    ],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "s",
                "modifiers": { "mandatory": ["left_command", "left_shift"] }
            },
            "to": [
                {
                    "key_code": "3",
                    "modifiers": ["left_control"]
                },
                {
                    "set_variable": {
                        "name": "Cmd+Shift+S_toggle",
                        "value": false
                    }
                }
            ],
            "type": "basic"
        }
    ]
}

Very nice! I haven’t done much with fixing little niggles in apps, this is inspirational.

I use Keyboard Maestro for most of my keyboard remapping requirements when my M3 MacBook Air is connected to my trusty Microsoft Natural Ergonomic 4000 keyboard. However, there are a few things that I’m having trouble getting to work — not necessarily because Keyboard Maestro can’t but because macOS apparently isn’t sending the key codes for some of the special keys. So I might check if my old Karabiner Elements licence is still good for anything, and see if that can find the awkward keys.

(Possibly related to above, I’ve had trouble in the past with Blender not recognising the number pad keys, which is a major PITA.)

Karabiner Elements license? Isn’t it free? Did I buy a license and then forget?

Here is the pricing info:

Spoiler alert: It’s free!