How to swap @ and " keys

Hi community,

I've recently returned to BTT (and OSX) after a 5 year hiatus on Windows. I'd like to swap the @ and " keys on my keyboard so that SHIFT + ' = @ and SHIFT + 2 = " (as is the functionality on Windows).

I can enter one shortcut, but when both are entered one triggers the other (whichever was entered first). So if I remap SHIFT + 2 to be SHIFT + ' then when I try to map the other way around it triggers the first remapping (which makes sense). The actual key characters for @ and " are not available in the Keyboard Keys section of the Action panel in BTT, so I assume remapping the SHIFT + commands is the only way to achieve what I desire?

Done a fair bit of searching, to no avail, so if someone can help me achieve this I would be grateful!

Cheers,
Dan

I did not test. But I think this should work, I hope :innocent:

Shortcut
SHIFT + ' = does nothing (no action)

Key Sequence
SHIFT + ' = @
(use type text, insert by typing)

Hi Frank, thank you! That kind of works, but because it's pasting text it seems a bit temperamental. Is there any way to force the app to “type“ text rather than pasting? Also, it also means the speech marks don't automatically switch between opening and closing - i.e. I can only have either opening speech marks or closing speech marks, not automatically opening and closing, if that makes sense.

I'm genuinely surprised I'm the only person that has wanted this functionality with BTT!

Just adding some more text to get around the spam filter...

You can choose whether something should be inserted with cmd+v or by typing.

i'm just guessing ... maybe left shift opening, right shift closing?

IMHO Karabiner Elements is the correct software to do this in. Then it's done via a device driver at a low level, so it works everywhere at all times.

I use Karabiner to do exactly this already (amongst other things)

"Swap double quote and at" is the one that swaps ' and @ - I don't know why I said "double quote", should be "single quote"!

I think I made that myself rather than downloading it from the available presets. Here's its definition:

                    {
                        "description": "Swap double quote and at",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "2",
                                    "modifiers": {
                                        "mandatory": [
                                            "shift"
                                        ],
                                        "optional": [
                                            "caps_lock"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "quote",
                                        "modifiers": [
                                            "left_shift"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "from": {
                                    "key_code": "quote",
                                    "modifiers": {
                                        "mandatory": [
                                            "shift"
                                        ],
                                        "optional": [
                                            "caps_lock"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "2",
                                        "modifiers": [
                                            "shift"
                                        ]
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }

Correct, for such things Karabiner Elements (or possibly Ukulele) is better. For simple key switching you could even use macOS built in functionality: hidutil key remapping generator (hidutil-generator.netlify.app) )