Reputation: 170
I want to change the key binding set in Xcode 11 some are editable bur some are greyed which I cannot edit, how to unlock it.
Upvotes: 0
Views: 847
Reputation: 417
You can change them! Here's what you do:
~/Library/Developer/Xcode/UserData/KeyBindings/Default.idekeybindings
<string>
tag underneath the <key>
with value <Alternate>
from YES to NOUpvotes: 2
Reputation: 13629
To be clear, you cannot edit key bindings that are grayed out. They are generated based on the preceding setting. For example, if the preceding settings is ⌘2
then the grayed out setting below may add ⌥
to become ⌘⌥2
.
If you're astonished at how poor this design is, then rest assured that your understanding is correct.
As a workaround, I use BetterTouchTool to remap my shortcuts. For example to "close other tabs" I remap ⌘⇧W
(my preferred shortcut) to ⌥⌘W
(Xcode's default) and have it only apply to the Xcode app.
Upvotes: 1
Reputation: 3905
Because they are similar to other editable shortcuts thus are treated as something like dependent variables.
In the File Menu section for example, the Close Tab
(CMD+W) shortcut is editable. Meanwhile, the similar shortcuts (Close Other Tabs
(Option+CMD+W), Close Window
(Shift+CMD+W), Close Other Windows
(Control+Option+CMD+W), Close All Windows
(Option+Shift+CMD+W)) are not editable (greyed).
But when I change Close Tab
from (CMD+W) to (CMD+M), the W in the keys of all those similar shortcuts will be changed accordingly to M.
You can verify this on your computer.
Upvotes: 1