Mac OS Keyboard shortcuts for developers

As a developer, when I switched from Windows & Ubuntu OS to Mac OS, I struggled a lot to discover the shortcuts. The shortcuts are not very obvious as in Windows or Ubuntu. Hence I have compiled a list of shortcuts which I found very handy in Mac OS.

General:

Cmd + Space -> Spotlight search. Search/Open any app or files
Cmd + Up Arrow -> Home key / Move to the start of the file
Cmd + Down Arrow -> End key / Move to the end of the file
Cmd + Left Arrow -> Go to start of current line
Cmd + Right Arrow -> Go to end of current line
Cmd + W -> Close current window or tab
Cmd + Q -> Quit or close the application
Cmd + Option + W -> Close all windows
Cmd + M -> Minimise current window to the dock
Cmd + H -> Minimise current window
Cmd + Option + H -> Minimise all other application's windows
Cmd + Tab -> Toggle between different applications
Cmd + ` -> Toggle between windows in same application
Cmd + Alt + D -> Show or Hide Dock
Ctrl + Left Arrow -> Move left in the desktop or dashboard
Ctrl + Right Arrow -> Move left in the desktop or dashboard
Ctrl + Up Arrow -> Mission Control or Expose all windows
Ctrl + Down Arrow -> Application windows of current Application
Ctrl + D -> Delete Key
Option + Left Arrow -> Go one word to left
Option + Right Arrow -> Go one word to right
F11 -> Show desktop
F12 -> Show dashboard
Fn + Up Arrow -> Page Up key / Move one page up
Fn + Down Arrow -> Page Down key / Move one page down
Fn + Left Arrow -> Go to start of current line
Fn + Right Arrow -> Go to end of current line

Menu bar:

Ctrl + F2 -> Move focus to Menu bar
Esc -> Move focus from menu bar to application
Arrow Keys -> Use arrow keys to navigate left/right, up/down and expand/collapse
Alphabet Keys -> Quick navigation to menu or menu item

Creating Zoom shortcut:


  1. Go to System Preferences -> Keyboard -> Shortcuts tab
  2. Click App Shortcuts
  3. Click + (Plus) sign
  4. In Menu Title, enter Zoom
  5. In Keyboard Shortcut, press the following keys Cmd + Option + =
  6. Click Add button
Now Cmd + Option + = can be used to zoom or reset any window


Finder:

Cmd + Shift + H -> User's home directory
Cmd + Shift + C -> Move up one directory
Cmd + Shift + G -> Go to a path (copied from terminal) and use Tab key to auto complete paths
Cmd + O -> Open a file or directory
Cmd + I -> Get Info about a file or directory (like size etc). Use Cmd + W to close it.
Enter -> Rename a file or directory
Cmd + 1 -> Icon view
Cmd + 2 -> List view
Cmd + 3 -> Column view
Cmd + 4 -> Cover view
Cmd + C -> Copy file or directory
Cmd + Option + C -> Copy absolute path of file or directory
Cmd + V -> Paste file or directory
Cmd + Backspace -> Move file or directory to trash
Cmd + Option + Backspace -> Permanently delete file or directory
Cmd + T -> Open new tab
Cmd + Shift + ] -> Switch tab to the right
Cmd + Shift + [ -> Switch tab to the left
Cmd + N -> New Finder window
Cmd + Shift + N -> New folder
Cmd + Down Arrow -> Navigate to the selected directory
Cmd + Up Arrow -> Navigate to parent directory
Cmd + Right Arrow -> Expand the selected directory
Cmd + Left Arrow -> Collapse the selected directory
Arrow keys -> Navigate between items in Finder
Alt + Up Arrow -> Navigate to first item in the directory
Alt + Down Arrow -> Navigate to last item in the directory

Terminal:

Cmd + C -> Copy text
Cmd + V -> Paste raw text
Cmd + Ctrl + V -> Paste escaped text
Cmd + T -> New tab
Cmd + N -> New Terminal
Cmd + W -> Close current terminal or tab
Cmd + Shift + ] -> Switch tab to the right
Cmd + Shift + [ -> Switch tab to the left
Ctrl + W -> Delete one word to the left
Ctrl + E -> Go to end of the command
Ctrl + A -> Go to start of the command
Option + Left Arrow -> Navigate one word to the left
Option + Right Arrow -> Navigate one word to the right

Comments

Popular posts from this blog

JSON with curl and jq

Import self signed in Linux for Chrome / Chromium headless testing

Colima - Drop In replacement for Docker Desktop for Mac and Linux