Friday, July 5, 2019

Mac Keyboard Shortcuts



https://www.macobserver.com/tips/quick-tip/navigate-mac-full-keyboard-access/
macOS has an accessibility feature called Full Keyboard Access, and it lets you use your keyboard to interact with things on the screen. You use the Tab key and arrow keys in order to navigate, and the Space bar to select an item.
Switch between navigation of all controls on the screen, or only text boxes and listsControl-F7
Move to the next controlTab
Move to the previous controlShift-Tab
Move to the next control when a text field is selectedControl-Tab
Move the focus to the previous grouping of controlsControl-Shift-Tab
Move to the adjacent item in a list, tab group, or menu
Move sliders and adjusters (Up Arrow to increase values, Down Arrow to decrease values)
Arrow keys
Move to a control adjacent to the text fieldControl–Arrow keys
Choose the selected menu itemSpace bar
Click the default button or perform the default actionReturn or Enter
https://apple.stackexchange.com/questions/135370/how-can-i-set-up-a-keyboard-shortcut-for-switching-input-source
Go to System Preferences → Keyboard → Shortcuts → Input Sources and define a keyboard shortcut there.
https://stackoverflow.com/questions/41724187/how-to-delete-mac-os-x-default-input-source

https://discussions.apple.com/thread/2705973
I don't think you can disable US. OS X always keeps one Apple keyboard like that active by default. This might be to avoid users accidentally winding up with no keyboard able to enter ascii characters for passwords, etc.
https://support.apple.com/en-us/HT204436



Change the default function key behavior
If you want to change the top row of keys to work as standard function keys without holding the Fn key, follow these steps:
  1. Choose Apple menu  > System Preferences.
  2. Click Keyboard.
  3. Select "Use F1, F2, etc. keys as standard function keys". 

https://www.techrepublic.com/article/how-to-permanently-display-the-function-keys-for-certain-apps-in-the-macbook-pro-touch-bar/


To enable the function keys for an app, click the Apple menu (upper left corner of the desktop) and then click System Preferences. Click on Keyboard and then the Shortcuts tab. Within this new window (Figure A), click on the Function Keys entry at the bottom of the left pane.
http://osxdaily.com/2015/07/07/page-up-page-down-mac-keyboard/

Page Up with Fn + Up Arrow

The “fn” key is at the lower left of all modern Mac keyboards, and when you combine that with the Up arrow, which is found on the lower right of the keyboard, you will perform the equivalent of a page up.

Page Down with Fn + Down Arrow


https://www.danrodney.com/blog/home-end-page-up-and-page-down-keys-on-a-mac-keyboard/
  • Page Up is fn-Up Arrow
  • Page Down is fn-Down Arrow
  • Home is fn-Left Arrow
  • End is fn-Right Arrow
  • Enter (in the number pad of a full keyboard) is fn-Return
  • Delete Right (also called Forward Delete) is fn-Delete
https://7labs.io/tips-tricks/text-replacement-mac.html
System Preferences >> Keyboard and click on the Text tab


http://osxdaily.com/2012/03/27/making-sense-of-mac-keyboard-symbols/
⌘ is command

⌥ is option

⌃ is control

⇧ is shift

⇪ is caps lock

← is left arrow

→ is right arrow

↑ is up arrow

↓ is down arrow

⇥ is tab

⇤ is backtab

↩is return

⌤ is enter

⌫ is delete

⌦ is forward delete

⇞ is page up

⇟ is page down

↖is home

↘is end

⌧ is clear

␣ is space

⎋ is escape

⏏is eject
http://osxdaily.com/2018/01/04/keyboard-shortcut-show-mac-desktop/
Show the Mac Desktop with: fn + F11

https://support.apple.com/en-us/HT201236

  • Shift–Command–Question mark (?): Open the Help menu.
http://osxdaily.com/2011/08/31/go-to-folder-useful-mac-os-x-keyboard-shortcut/
Use Tab Completion
Drag & Drop Support
Hit Command+Shift+G from the Mac OS X desktop or a Finder window.
ctrl+v not work
Right Click
https://apple.stackexchange.com/questions/119699/how-to-make-right-click-using-keyboard
To right click press Fn-Ctrl-I
https://finance.yahoo.com/news/the-many-different-ways-to-right-click-in-os-x-84954004439.html
Control+click

https://apple.stackexchange.com/questions/135370/how-can-i-set-up-a-keyboard-shortcut-for-switching-input-source

Go to System Preferences → Keyboard → Shortcuts → Input Sources and define a keyboard shortcut there
https://support.apple.com/kb/ph25642?locale=en_US
  • Move the mouse pointer:
    With the keyboard: Use the 7, 8, 9, U, O, J, K, L keys.
  • Click a mouse button:
    With the keyboard: Press I.
  • Press and hold the mouse button:
    With the keyboard: Press M.
  • Release the mouse button:
    With the keyboard: Press “.” (period).
http://www.chriswrites.com/10-ways-to-navigate-mac-os-x-using-just-keyboard-and-gestures/
To navigate backwards and forwards in Finder, use Command + [ to go back and Command + ] to go forwards. This also works in Safari to move between your page historyCommand + up takes you up a level in the folder structure
Command + down opens the current folder in the same window


Another useful shortcut is Command + ` (next to the left Shift key) to swap between an application’s open windows

To select a file in the current Finder folder, begin typing the name of the file and the active item will update to match what you’ve just typed. Alternatively, the arrow keys can be used to move the selection; press the Spacebar to preview a selected item, Command + Down to open an item, or Command + I to get more information.
Command + X cuts the highlighted text
Shift + Alt + Command + V pastes the highlighted text and matches the destination style

https://superuser.com/questions/303525/what-is-the-shortcut-to-access-the-menubar-in-mac-os-x

The exact same functionality doesn’t exist on Mac OS X. There's no concept of underlined characters in the menus for quick selection.
You can move keyboard focus to the menu bar by pressing Ctrl+F2. Configure the shortcut in System Preferences.
You can press Cmd+? and start typing any menu bar item label to select it from the Help menu entry. This helps tremendously with the menus of rather complex applications.
enter image description here
If you’re a Mac newcomer or have just installed a new app, it’s handy to get an overview of available shortcuts. CheatSheet provides such a thing in a user-friendly manner.
http://osxdaily.com/2018/01/04/keyboard-shortcaut-show-mac-desktop/
Show the Mac Desktop with: fn + F11
https://istweb.apple.com/supporting-apps/directory/
Capture the entire screen
Step 1: Press the “Command” + “Shift” + “3” keys simultaneously.
That will save a copy of your screen to your clipboard. You can alternatively press the same combination without the “Command” key in order to save the image as a PNG file to your desktop.
Capture a selected area
Step 1: Press the “Command” + “Shift” + “4” keys simultaneously.
Step 2: With your mouse pointer turned into a crosshair, use it to select the region you wish to capture.
Step 3: You can fine-tune your selection by pressing the space bar, which will let you take a full-screen capture or to select an open menu.
Your selection will then be copied to the clipboard. Alternatively, don’t press the “Command” key and your screenshot will be saved to the desktop as a PNG file.
https://www.cnet.com/news/access-menus-via-the-keyboard-in-os-x/
Apple's default option for accessing the menus is to press Control-F2. However, this may sometimes not work, especially if you have the function hot keys used for other features like the Dashboard, Launch Pad, and other system controls and services.

http://www.hammerspoon.org/go/#helloworld
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "W", function()
  hs.alert.show("Hello World!")
end)
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "H", function()
  local win = hs.window.focusedWindow()
  local f = win:frame()

  f.x = f.x - 10
  win:setFrame(f)
end)
This will now cause ++ctrl+H to make move the currently focused window 10 pixels to the left. You can see that we fetch the currently focused window and then obtain its frame. This describes the location and size of the window. We can then modify the frame and apply it back to the window using setFrame().


You will need to create a Lua script in~/.hammerspoon/init.lua using our APIs and standard Lua APIs.
https://lifehacker.com/hammerspoon-is-powerful-free-automation-tool-for-os-x-1757351485
Mac: There’s all kinds of automation tools on OS X, from the built-in Automator to commercial options like Keyboard Maestro. Hammerspoon’s another tool that sits in the same space, but works a little more like something like AutoHotKey.

https://apple.stackexchange.com/questions/32715/how-do-i-open-the-context-menu-from-a-mac-keyboard
When activated, a right mouse click then can be achieved by Ctrl+5 on a keyboard with a numpad or Fn+Ctrl+i on a laptop. This will allow you to 'right-click' your word.
Go to System Preference --> accessibility --> Mouse --> Enable Mouse Keys (ON) 
https://www.cnet.com/news/access-menus-via-the-keyboard-in-os-x/
Apple's default option for accessing the menus is to press Control-F2. 
https://apple.stackexchange.com/questions/38015/how-can-i-switch-dialog-buttons-using-the-keyboard
  1. System Preferences→Keyboard→Keyboard Shortcuts
  2. and select All controls under Full Keyboard Access
    • Now you can use  (tab) to switch between the dialog boxes.
    • Note: Unlike in Windows, you need to hit space to trigger a highlighted box that is not the default one! (If this is not natural to you, here's something that helps many to remember tab and space rather than just enter. The space bar is the keyboard version of a one button mouse with the tab moving the mouse's pointer for you.)
enter image description here
https://apple.stackexchange.com/questions/288658/way-for-new-mac-touch-bar-to-behave-the-same-as-the-old-keyboard
In the system preferences go to "Keyboard". Select the "Shortcuts"-tab. Select "Function Keys" in the left menu. Click the + and add the applications where you want the F-keys to always show.
If you never want the touch bar but the old F-keys with brightness, volume backlight and so on. Go back to the "Keybard"-tab and select "Expanded Control Strip" in the "Touch Bar Shows" drop-down menu.
https://askubuntu.com/questions/902630/what-is-meta-key-for-ubuntu-on-mac
On my Macbook Pro (el capitan), the meta key is by default mapped to the ESC key.
http://smallbusiness.chron.com/remove-gestures-mac-38529.html
2. Click “Trackpad.” Three tabs appear at the top of the Trackpad settings window: “Point & Click,” “Scroll & Zoom” and “More Gestures.”
3. Click a tab to view a list of the gestures in that category. For example, click “More Gestures” to see gestures such as “Swipe Between Pages” and “Show Desktop.”
4. Click the check box next to the name of a gesture to deselect it. The gesture is now disabled. When you are finished removing gestures, click the red circle at the top of the Trackpad settings window to close it.
https://www.apple.com/shop/question/answers/readonly/is-there-a-keyboard-short-cut-for-page-updown-with-the-wireless-keyboard/Q72FCDUUUC29J4H42
No, this keyboard has a similar layout like the macbook where there is no dedicated page up/page down keys. However, there are keyboard shortcuts for these functions and more:
1. FN+(Arrow up/down) = Page up / down
2. FN+(Arrow left/right) = go to top or bottom of a page
3. COMMAND+(Arrow up/down) = go to top or bottom of a page
4. COMMAND+(Arrow left/right) = go to beginning/end of a line

1. Use Command-Tab and Command-Shift-Tab to cycle forward and backward through your open applications. (This functionality is almost identical to Alt-Tab on PCs.)
2. Or, swipe up on the touchpad with three fingers to view the windows of open apps, allowing you to quickly switch between programs. This view is called Mission Control, which also has its own dedicated keyboard shortcut (F3).
In System Preferences → Keyboard → Shortcuts, under Function Keys, add apps to the list to show the function keys by default. The fn key will then be used for the inverse function, hiding the function row instead of showing it. You'll need to do this for every app where you would like this behaviour.
  •  (TAB) will move between buttons.
  • esc (ESC) is cancel.
  • space (SPACE) selects the active button (blue, outline).
  •  (RETURN) is OK or the default button (blue, pulsing, filled).
If you want to search into a specific folder and its subfolders, you will need to go into the specific folder in Finder, use the search bar on the top-right corner of the window, and select the name of the folder on the same bar where it has the button "This Mac"
From anywhere in the Finder, pull down the Finder menu and choose “Preference”
Click on the “Advanced” tab and pull down the menu under “When performing a search:”, selecting from the pulldown menu “Search the Current Folder” instead

I suggest you to open your keyboard visualizer (by clicking on the flag that is near the clock in the menu bar).
This will make appear a window with a keyboard representation.
If you press the fn key, you'll see that the  will become a ↖︎ (Home key) in this window while  will become ↘︎ (End key).
That's it: just press the fn+ or fn+ to obtain the diagonal-arrow.

Command + H hides the current application and all of its windows

Command + F3 pushes all your open applications out of the way so you can actually see your desktop, so you can procrastinate dealing with impending application overload.
Command + a number helps you easily scroll through the respective tabs in your web browser

1, 2, 3 will advance the video to 10 percent completion, 20 percent completion, 30 percent completion, respectively (and so on and so forth). Take that, little niece.

Control+Option+Command+Eject quickly shuts down your computer so you can get outside, you crazy, pasty kid

Create a Keyboard Shortcut to Quickly Get to the User Library Folder in OS X

In System Preferences → Keyboard → Shortcuts, under Function Keys, add apps to the list to show the function keys by default. The fn key will then be used for the inverse function, hiding the function row instead of showing it. You'll need to do this for every app where you would like this behaviour.

Labels

Review (572) System Design (334) System Design - Review (198) Java (189) Coding (75) Interview-System Design (65) Interview (63) Book Notes (59) Coding - Review (59) to-do (45) Linux (43) Knowledge (39) Interview-Java (35) Knowledge - Review (32) Database (31) Design Patterns (31) Big Data (29) Product Architecture (28) MultiThread (27) Soft Skills (27) Concurrency (26) Cracking Code Interview (26) Miscs (25) Distributed (24) OOD Design (24) Google (23) Career (22) Interview - Review (21) Java - Code (21) Operating System (21) Interview Q&A (20) System Design - Practice (20) Tips (19) Algorithm (17) Company - Facebook (17) Security (17) How to Ace Interview (16) Brain Teaser (14) Linux - Shell (14) Redis (14) Testing (14) Tools (14) Code Quality (13) Search (13) Spark (13) Spring (13) Company - LinkedIn (12) How to (12) Interview-Database (12) Interview-Operating System (12) Solr (12) Architecture Principles (11) Resource (10) Amazon (9) Cache (9) Git (9) Interview - MultiThread (9) Scalability (9) Trouble Shooting (9) Web Dev (9) Architecture Model (8) Better Programmer (8) Cassandra (8) Company - Uber (8) Java67 (8) Math (8) OO Design principles (8) SOLID (8) Design (7) Interview Corner (7) JVM (7) Java Basics (7) Kafka (7) Mac (7) Machine Learning (7) NoSQL (7) C++ (6) Chrome (6) File System (6) Highscalability (6) How to Better (6) Network (6) Restful (6) CareerCup (5) Code Review (5) Hash (5) How to Interview (5) JDK Source Code (5) JavaScript (5) Leetcode (5) Must Known (5) Python (5)

Popular Posts