xcode 7 conflicted shortcut cannot be removed - xcode

I added a shortcut key to "Clear Constraints" in the xcode preferences, and xcode installed the shortcut twice under different xcode names. (See the image.)
The problem is that there is no little "-" (minus) sign (see the red arrow in the image) to remove my duplicate shortcut attempt, because any key I press is interpreted as a shortcut combination.
The problem shortcut(s) are shown below the red arrow. The red arrow one is fine, I just wanted to show the little "-" minus sign there.
Does anyone know how to get around this problem (without reinstalling xcode and all my custom keybindings :-)). Thanks
Image showing duplicate shortcuts below red arrow

Quit Xcode. Restart the computer just to be on the safe side: we want to force Xcode to write its preferences out to disk.
Go to ~Library/Developer/Xcode/UserData/KeyBindings. Open the key bindings file with a good text editor.
You are now editing XML; I presume you know what you're doing. You will see two <dict> entries whose <action> starts with clearConstraints. Delete those entries. Save.

Related

How to edit greyed key bindings set in Xcode 11

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.
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.
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.

Remove xcode keybinding

I'm making changes to the default keybindings and getting some conflicts. Just unsure how I can unmap a keybinding that I don't need? I tried to hit delete on when selecting the shortcut in the list but to no avail.
P.S. I've tried double clicking the shortcut but no - button appears on the right.
How to delete a keybinding on Xcode ? (using version 9.3 of Xcode)
The first method is obviously the little - that sometimes appears when double-clicking a binding.
The second method is not so quick but (in my experience) just as efficient.
(Here I am assuming you've got a personalised keybinding profile already. If you don't, create one. I'll call it Personal.)
In Xcode: select the shortcut you want to remove and attribute it a random binding (even one that causes conflicts, you'll delete it in two minutes, you don't really care).
Quit Xcode.
Go to ~/Library/Developer/Xcode/UserData/KeyBindings/.
Open the file personal.idekeybindings (it's a simple XML file, any decent text editor should be able to handle it).
Find the shortcut you modified and want to delete by searching its name using command + F.
You should then find something looking like this (each dict corresponds to a modified shortcut):
<dict>
<key>Action</key>
<string>execute:</string>
<key>Alternate</key>
<string>NO</string>
<key>CommandID</key>
<string>Xcode.IDEPlaygroundEditor.CmdDefinition.Execute</string>
<key>Group</key>
<string>Editor Menu for Playground</string>
<key>GroupID</key>
<string>Xcode.IDEPegasusPlaygroundEditor.MenuDefinition.Editor</string>
<key>GroupedAlternate</key>
<string>NO</string>
<key>Keyboard Shortcut</key>
<string>^<</string>
<key>Navigation</key>
<string>NO</string>
<key>Title</key>
<string>Execute Playground</string>
</dict>
Delete this part:
<key>Keyboard Shortcut</key>
<string>^<</string>
Do that for each shortcut you want to remove and don't forget to save the file before closing it. Now open Xcode and check for the shortcut: the space for the keybinding should be empty.
When you double click a key binding, you should see an icon with a minus all the way at the right end of the text box. Simply clicking that icon removes the binding.
Xcode has two kinds of key bindings: ones you can customize within Xcode Preferences and ones you have to customize through System Preferences. The latter kind don't show a "minus" button within Xcode Preferences. To edit these:
Open System Preferences -> Keyboard -> Shortcuts
Click "App Shortcuts" then "+"
Choose "Xcode"
Put in the name and desired shortcut
Voila!

Arrow keys in Xcode 6 not working

I have the weirdest issue with Xcode 6 on OS X Yosemite. For some reason I can't use the left and right arrow keys anymore to navigate within my source code. Instead, the system beep sound would come up. Up and down arrows work fine.
I'm afraid it could have something to do with my fiddling around with the key bindings. In only changed the ones for block (de)indentation though (originally CMD+[, changed to TAB), so in my understanding the arrow keys shouldn't be affected at all.
I was able to make it work again by running
defaults delete com.apple.dt.Xcode
in the terminal and then restarting Xcode.
Probably you created a conflict when customizing your key bindings.
To fix that, in Xcode settings (⌘ + ,), go to Key Bindings tab and make sure your Move Left and Move Right commands are not empty under the Customized tab. If they are, just select them and hit ⌫.

Visual Studio Highlights when I don't select text

I just got into the office, and booted up my computer to work on my current project.
I hopped into a class file, and selected (through mouse highlighting) a group of events to delete.
What happened though was it only erased one character. Wondering what happened, I clicked at the beginning of the selection and re-highlighted the text to delete it again.
So i just clicked randomly in the middle of the file, and it highlighted from the beginning of the first selection all the way to where I clicked in the middle.
I have rebooted both VS, the computer and insured that sticky keys and all other "accessibility" software was turned off.
UPDATE
When I click shift and try to manually highlight with my arrow keys, the cursor doesn't even move.
UPDATE
When I click escape from the selection it goes to the search drop down:
alt text http://img69.imageshack.us/img69/9591/searchbox.png
The same thing happened to me, I held down the shift key for a few seconds then while still holding it down I clicked anywhere in the open page in Visual Studio, and voilá, my mouse click was back to normal.
I imagine I had unwittingly activated some kind of keyboard shortcut but not sure which
I had this same problem too. I believe I found the solution: check your keyboard options.
Go under tools -> options, under the Environment subtree, click 'Keyboard'. Then, you will see a dropdown with the label "Apply the following additional keyboard mapping scheme". If you select "Brief" from this, you get the keyboard behavior as described. I'm not exactly sure what "Brief" refers to, but it certainly isn't familiar to me.
Change the keyboard layout back to (default) or another one to get the behavior you expect.
Reinstalled VS and now everything is better.

Isn't there a Go To Last Edit Location shortcut in XCode?

I'm rather new to XCode and I still miss so many shortcuts and features available in IntelliJ IDEA.
Perhaps the biggest pain point for me is the lack of a keyboard shortcut (or even a menu action) that allows you to move through your most recent change points (points in which you modified files).
In case you're familiar with IntelliJ, I'm referring to the Ctrl-Shift-Backspace shortcut... (or Shift-⌘-Backspace on a Mac)
I'm NOT referring to navigation through your recent view points (via Alt-⌘-Left & Alt-⌘-Right) - only locations you edited.
You can find some useful XCode tricks here.
⌘-Z then redo
I got here via Google. In Xcode 4 & 5 the shortcuts are
CTRL + Command + Back Arrow
CTRL + Command + Forward Arrow
It's not available the way Jetbrains and other do it. Using AppCode might be a choice.
To scroll through your recent changes in Xcode:
Push and hold Control + Command keys (holding them both down)
Then press and release the back arrow (in the bottom right of the Apple keyboard)
While still holding the Control and Command keys down, press the back arrow down again.
This will scroll through the changes you have made to the files in your project. I believe this will only show you the changes since the project was opened.

Resources