Forget the AI key. I have a dash key!

ChatGPT helped me quickly code a dash key on my keyboard

Issue #17. Weekend Bonus!

On today’s quest:

— ChatGPT helped me quickly code an em dash key for my keyboard. I’m so excited, I have to share it with you on a Saturday.

Tip: I tried ChatGPT coding. It was amazing.

When I read about Microsoft putting an AI key on keyboards, I got a bee in my bonnet about keyboards not having an em dash key. It’s an outrage. An affront to writers and editors everywhere!

So I went down a rabbit hole of looking for ways to map the em dash command to a key on my keyboard. It’s possible, but it’s more complicated than I originally expected.

First, I found a free Mac program called Karabiner Element that lets you remap keyboard keys. But to make the ^ key give me an em dash, I had to map option-shift-hyphen to the 6 key, which required JSON code.

Being a tech-loving geek, I said, “How hard could it be?” despite having never used JSON. (Cue maniacal laughter.) An hour later, I still had buggy code that didn’t work.

I am stubborn, so I kept grinding away, until my husband said, “Why don’t you try ChatGPT? It’s supposed to be good at code.”

And now, my friends, you know why I married him.

I told ChatGPT what I wanted, gave it a sample command from the Karabiner Element documentation, and I had the ^ key working as an em dash within 3 minutes. — — —

It was amazing.

If you want your own em dash key, here’s the code. You just paste it in after clicking the “add your own rule” button*:

{
    "description": "Map left_shift+6 to option+shift+hyphen",
    "manipulators": [
        {
            "from": {
                "key_code": "6",
                "modifiers": {
                    "mandatory": [
                        "left_shift"
                    ],
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "hyphen",
                    "modifiers": [
                        "left_option",
                        "left_shift"
                    ]
                }
            ],
            "type": "basic"
        }
    ]
}

You may ask if it’s worth creating a process that requires two keystrokes instead of three (shift-6 versus option-shift-hyphen), but I often end up hitting the command key instead of the option key, which causes my screen to zoom out instead of giving me an em dash. Then I have to rezoom in and make the em dash again. Shift-6 will be much better.

What is AI sidequest?

Using AI isn’t my main job, and it probably isn’t yours either. I’m Mignon Fogarty, and Grammar Girl is my main gig, but I haven’t seen a technology this transformative since the development of the internet, and I want to learn about it. I bet you do too.

So here we are! Sidequesting together.

If you like the newsletter, please share it with a friend.

* I did have to enable some permissions in the settings, which the application prompted me to do, and restart Karabiner Elements to get it to work.

Written by a human.