Keyboard shortcut to show/hide Document Outline in Interface Builder - xcode

I need to frequently hide and unhide navigators and inspectors to make room for Interface Builder and complex storyboards. I learned all show/hide shortcuts in Xcode for panes, but can't find any for showing and hiding Document Outline. Is there a way to achieve this on keyboard?

There is no defined keyboard shortcut to show/hide the document outline. But you can define new shortcuts for these actions.
Just open the preferences (cmd+,) and search for "Document Outline" in the "Key Bindings" page.

Just to demonstrate the other solution how to setup the shortcut in System Preferences->Keyboard->Shortcuts.

In one of the Xcode updates 6 or 7.
⌘9 is re-allotted for Navigators > Show Reports Navigator
so,
System Preferences > Keyboard > Shortcuts > App Shortcuts > Show/ Hide Document Outline ⌘9
is invalidated by Xcode automatically.
⇧⌘9 is what I chose. in the Keybindings.

Related

Cocoa application Enter Full Screen no keyboard shortcut shown

I have a Cocoa application. In the View menu, the system adds an Enter Full Screen menu item. In other applications I see that this menu item has the keyboard shortcut ^⌘F. However in my application this keyboard shortcut is not shown in the menu and unsurprisingly this key combination does not enter full screen.
Interestingly, this keyboard shortcut, although shown in other applications, does not work.
How do I debug and/or fix this?
Any new Xcode application should get the View menu with Enter Full Screen already setup.
You can add the Key command in the Attributes Inspector.
If the key command doesn't work in ANY application, then that's likely a non-programming problem: most likely a conflict with a duplicate key command that's been configured.
Check System Preferences > Keyboard > Shortcuts > App Shortcuts.

macOS Keyboard Shortcuts in Swift

I am creating a macOS app and would like to create a keyboard shortcut for when the user taps the space bar for one of my buttons.
I am not sure where I should start and even where the documentation is for this? What should I be looking for?
You can now add keyboard shortcuts for many of your UI elements directly in a storyboard, by clicking on the Attribute inspector and scrolling down to "Key Equivalent". You just click in the Key Equivalent text field and press the key equivalent on your keyboard.

Xcode keyboard shortcut to jump directly to main editor window?

Is there an Xcode keyboard shortcut to jump directly to main editor window?
Cmd+J seems to be the closest, but it displays a UI for selecting which editor to open, or to open a new assistant editor.
There is a command in Xcode > Preferences > Key Bindings that is called Move Focus To Next Editor (Navigate Menu).
With it you jump to the main Editor and if you are in the main Editor you jump to the next editor until you had focus on all editors then you jump back to the main one.
Take a look at the official and this blog about Xcode shortcuts.
Xcode also has a pretty complete "Key Bindings" section in its preferences.
No there is no XCode Keyboard shortcut to jump directly to main editor window. But yes ⌘+J allows you to move to editor window. I am attaching a picture of probably all the shortcuts for XCode 4. I found this on a blog... The picture is quite big so you will have to zoom.

Add a "Build and Analyze" button to XCode's toolbar

Is there a way to add a "Build & Analyze" icon to XCode's toolbar? If not, is there at least a way to assign a keyboard shortcut to this option?
Looks like no on the toolbar item. To see the customization options for a toolbar control-click it (or right click it if you have a two button mouse).
You can assign a keyboard shortcut to any menu item in Mac OS X via System Preferences. See http://docs.info.apple.com/article.html?path=Mac/10.5/en/8564.html
Xcode also has its own keybindings interface, which you can find in Xcode preferences.

How to tab focus onto a dropdown field in Mac OSX

In Windows, in any windows form or web browser, you can use the tab button to switch focus through all of the form fields.
It will stop on textboxes, radiobuttons, checkboxes, dropdown menus, etc.
However, in Mac OSX, tab skips dropdown menus. Is there anyway to change this behavior, or access the above items mentioned, without using a mouse?
Go to System Preferences > Keyboard and Mouse, then choose Keyboard Shortcuts. At the bottom, ensure Full Keyboard Access is set to "All controls". It's a long time since I turned it on but I think that's all you need to do
Apple Menu > System Preferences > Keyboard & Mouse > Keyboard Shortcuts:
Change the radio button at the bottom from "Text boxes and lists only" to "All controls."
Edit: Dammit. We're a fast group around here aren't we? :-)
I have found that I also need to set accessibility.tabfocus to 7 in Firefox's about:config.
It's in the System Preferences - this blog post shows where the setting is.

Resources