Xcode Preview Resume Button Shortcut - xcode

Is there a keyboard-shortcut to click the resume button in the canvas on Xcode Previews, instead of clicking it every time?

⌘ command + option + P is what you're looking for.

Quick Answer
Editor -> Previews -> Refresh
Refresh canvas shortcut
⌥ option + ⌘ command + P
Open canvas shortcut
⌥ option + ⌘ command + ↩ return
💡 Automated way to refresh the preview
Note that there is an option called Automatically Refresh Canvas that is enabled by default and helps you to not refreshing it manually again and again.
🎁 How to find ANY macOS apps shortcuts
In almost all macOS apps, you can use help menu to find the submenu item you want (some kind of preview in this case). And it will show you the exact location of the submenu alongside the associated shortcut:
I have searched for preview for this case :)

Related

Where did the Object Library go in Xcode 10?

In Xcode 10, where is the Object Library which shows view and controller objects, code snippets and media that used to appear towards the lower right corner in Xcode 9 and older?
Xcode 9:
Xcode 10:
Shortcuts:
Shift + Command + L: Show Library.
Shift + Command + M: Show Media Library.
Xcode 10 has added a toolbar button to access the Object Library.
From a thread on Apple Developer Forum:
Library content has moved from the bottom of the Inspector area to an overlay window, which can be moved and resized like Spotlight search. It dismisses once items are dragged, but holding the Option key before dragging will keep the library open for an additional drag.
The library can be opened via a new toolbar button, the View > Libraries menu, or the ⇧⌘L keyboard shortcut. Content dynamically matches the active editor, so the same UI provides access to code snippets, Interface Builder, SpriteKit, or SceneKit items. The media library is available via a long press on the toolbar button, the View > Libraries menu, or the ⇧⌘M keyboard shortcut. (37318979, 39885726)
What the existing answers (so far) neglect to mention is that if you hold Option as you summon the Library window — i.e., press Shift + Option + Command + L, or hold Option while clicking the Library button in the toolbar — the window stays open, permanently, until you explicitly close it with its Close button.
It is not incorporated (docked) into the current project window, but it can be used in any project. The point is that it becomes almost a normal window (to be precise, it becomes a normal floating window).
XCode 11 - Object library location
Click on the plus icon on the top right corner of Xcode topbar.
The library can be opened via a new toolbar button, the View → Libraries menu, or the Shift + Command + L keyboard shortcut.The media library is available via a long press on the toolbar button, the View → Libraries menu, or the Shift + Command + M keyboard shortcut.
Library content has moved from the bottom of the Inspector area to an overlay window, which can be moved and resized like Spotlight search. It dismisses once items are dragged, but holding the Option key before dragging will keep the library open for an additional drag.
In Xcode 11 use Shift + Command + L to show the Object Library.
Xcode 12 users can find the same option as the Xcode 11 as written above.
Shift Command L to bring up the Objects/Image/Color and other context-sensitive libraries.
There is also the + sign at the top right of the window titled Library when you mouseover.
This drove me crazy trying to follow a tutorial that was likely written for Xcode 10. Thanks for the rest of those that answered!

Hide dock tab in Android Studio by hotkey

I am using Android Studio 1.0.2 on mac.
When fn+F1 pop the documentation, how can I use hotkey to hide it?
(Press F1 again doesn't hide it)
At the top right of the image, I wonder what is the key after Shift?
Use Shift+Esc to close the area.
Just found out Shift + Click on the title bar can hide the tab.
So I guess the icon might not be a key, it means click.

What is the shortcut for inspecting elements in Firefox

I read the documentation about Firefox's page inspector. I didn't find any shortcut for inspecting an element directly without clicking the button 'choose element with mouse'. The documentation for opening the inspector itself even looks to be wrong.
You open it with cmd + option + i on OSX rather than cmd + option + c as described in the documentation.
Using Firefox v24
It seems that Ctrl+Shift+C always open the inspector in "choose element with mouse" mode. [Linux, FF 26.0. Also works in Chrome.]
It's not exactly the same flow as context menu -> inspect element but I find it more useful. The hover tooltip sometimes gives me all the info I need. And it's more reliable — just opening the context menu generates a mouse event while Ctrl+Shift+C doesn't. E.g. with CodeMirror which plays games with invisible elements, using context menu usually lands me in the hidden textarea or fake cursor, while "choose with mouse" mode reliably gives me the styled editor content I wanted to inspect.
Windows: Ctrl+Shift+C.
Mac: Cmd+Option+C.
Ctr + Shift + C and function F12 button is default inspect element button for every browser.
So if firebug isn't installed in your firefox then F12 button is the shortest shortcut for your goal.
I'm not sure about the way you do it in Mac OS, but on windows, if you select the element by pressing tab until you reach it, if you press the context menu key and then Q, you open the inspector on that specific element, like it happens when you right click on it.
I believe the context menu key is not a mac thing, but it seems that there are people that worked around to do it. See this question: How do I open the context menu from a Mac keyboard?.
On Mac (I'm using Yosemite though), it's Command ⌘ + Option + c.
On Linux (Ubuntu 18.04) and Firefox (version 72.0.2) it's CTRL + SHIFT + i , or hotkey F12.

How can I close Visual Studio's dockable windows with my keyboard?

It's kind of annoying to have to use my mouse to close the windows that appear when when summoned by my keyboard e.g. I find usages of an object by hitting Shift+F12, or any of the other dockable windows that appear for various other reasons.
Ideally these would close when I hit escape, but this does nothing. Alt+F4 wants to close the entire visual studio.
Is there any keyboard shortcut to close these windows?
To be clear, this is the kind of window I'm referring to:
According to Default Keyboard Shortcuts in Visual Studio 2015, you can use the following:
Shift + Esc - Window.Close (window must have focus)
Ctrl + F4 - Window.CloseDocumentWindow to close the current tab
It appears #inksmithy has answered the question, even though it doesn't work for me. I reckon it's because I'm using ReSharper and he isn't.
For what it's worth, I just discovered Ctrl + Shift + F4 works for me.
I've decided to mark #inksmithy's answer as correct but if that doesn't work for you try my one.
Set Focus to docked window (e.g. [Ctrl]+[g] for immediate window)
Press context menu key (at the right side of the space key)
Press the key to hide that window, indicated by _ in the contextmenu
(depends on your language)

How can I make another button highlighten on popup window on Mac by using Keyboard

On the above shown asking popup window on Mac, how can I select another button (left button) by using keyboard.
Without clicking mouse button, I want to make left button highlighten.
Is there any shortcuts?
Go to Preferences -> Keyboard. At the bottom, turn on "All controls" under "Full Keyboard Access".
The alternate option will be highlighted with a blue ring. Hitting space will activate this. If there are multiple options, hitting tab will alternate between them.
For English/Mac OSX 10.10:
Go to Keyboard in System Preferences, and then select 'All controls'. Space will select the alternate option if two options. If more than two options then tab will alternate between them.
PS: I would much rather the option of using arrow keys and enter. Interested to know if anyone knows how to hack this?
After reading Tricon's answer, I got the way!!!
Just see the following shortcuts.
Preferences -> Keyboard -> Keyboard & keyboard input (I don't know the correct English menu, I'm using Korean "탭이 초점을 이동하는 방식 변경 (^F7) )
Once you do ^F7 (In case of mac book, Control + fn + F7) on a popup window, you can travel over buttons on any popup windw!!!
Thank you Tricon for giving me clue :)
In Catalina in Keyboard -> Shortcuts press Use keyboard navigation to mve focus between controls. Then you can use Tab to highlight another button and use Space to actually press it.

Resources