Xcode 12 can't use option key in key bindings

I have several key bindings that rely on using the option key as part of the key sequence.

Xcode 12 broke some of my bindings.

Upgrading Xcode has broken some of my key bindings in the past, but for some reason, as of Xcode 12, I cannot create a key binding that has the option key as part of it.

For example, if I try to make something use cmd+option+leftarrow, the key binding shows just cmd+leftarrow. Where's my option key?!

I've tried my external keyboard, built-in MBP keyboard, and even the software Keyboard Viewer. No luck.

Anybody else experiencing this?
Post not yet marked as solved Up vote post of jx2 Down vote post of jx2
2.8k views

Replies

Experiencing the same, this is really annoying. Only thing I can imagine right now is that I have yet to update to Big Sur. Other than that my setup is really standard.

Have you found a solution?
I have tried adding it via keyboard > shortcut keys bit in my case (wanting to move to next tab) it opens the tab but splits the screen, which is indeed not what I need... Maybe it works in your case.

Also, I looking into "XCODE CUSTOM KEY BINDINGS" try googling it, you will find it is possible to edit "Default.idekeybindings" as a text file and add what you need. I have found that (under the Shortcut key tag):

^ is equal to control (of course)
$ is equal to shift
@ is equal to cmd
and most importantly:
~ is equal to option.

Other special keypresses may show up as a question mark (inside a square) in the my editor (sublime text), maybe due to encoding. I would assign something I Xcode and quit and then check the above file, then modify.

I don't know why, but researching this, the option key started working for me. To find the code for the option key, I chose a random action (Export...) in the Xcode key binding prefs and tried assigning option+s to it and it worked - I assumed because it's a simple shortcut, but it turns out that where I need it (Show Previous Tab and Show Next Tab) I am unable to use the option key.

So what I did was assign the shortcut key I wanted to "Export..." and something wrong to "Show Previous Tab", exit Xcode, go to Default.idekeybindings and swap them. Then it would act exactly like standard bindings and split the view.

I think something bad is going on with the tabs inside tabs thing in the new Xcode that is messing with things. Maybe this relates back to me not being updated to Big Sur, time will tell.

Please report your findings, this is killing me :)
Well, I could not stop looking into this.

Heres my solution - finally! Given that I thought that this relates to the tabs I found I was able to find this article: (google it again...) "How to fix the incomprehensible tabs in Xcode 12"

Changing navigation style to "Open in Place" under Navigation in Xcode prefs made it so I can remove all the mess I made with "Default.idekeybindings" and just use standard keyboard shortcuts assigned in System preferences > Keyboard > Shortcuts.

Yay!