Is it possible to connect to AirPods Pro via keyboard shortcut?
Karabiner + Blueutil Solution
I do something like this using a bluetooth cli tool named blueutil. Here is a complex modification you could use in Karabiner.
{
    &quot;title&quot;: &quot;Bluetooth Connect&quot;,
    &quot;rules&quot;: [
        {
            &quot;description&quot;: &quot;Connect to AirPods&quot;,
            &quot;manipulators&quot;: [
                {
                    &quot;from&quot;: {
                        &quot;key_code&quot;: &quot;a&quot;,
                        &quot;modifiers&quot;: {
                            &quot;mandatory&quot;: [&quot;fn&quot;]
                        }
                    },
                    &quot;to&quot;: [
                        {
                            &quot;shell_command&quot;: &quot;/usr/local/bin/blueutil -p 1; /usr/local/bin/blueutil --connect \&quot;AirPods Pro\&quot;&quot;
                        }
                    ],
                    &quot;type&quot;: &quot;basic&quot;
                }
            ]
        }
    ]
}


+ Goku
Goku is a tool for more easily managing your karabiner configuration. I use this to manage mine. I have configured Karabiner to use F10 as a &quot;audio layer&quot;/modifier key for audio related mappings. If you learn a little about how Goku works, you can check out my configuration if you want to implement something like this for yourself.