My macOS keyboard shortcuts
source link: https://www.jamieonkeys.dev/posts/keyboard-shortcuts/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
All* my macOS keyboard shortcuts
*Not literally all, but certainly those which I find most useful, and which also might not be all that widely known.
Posted by Jamie on 1 April 2022. About a 7 minute read.
I use macOS to build websites and compose music. This post is a collection of keyboard shortcuts and modifiers that help my day-to-day productivity.
macOS native shortcuts and modifiers permalink
Useful shortcuts already defined by the system.
Window management permalink
- Command-Backtick: cycle current application’s windows
- Command-H: hide active application’s windows1
- Command-Option-H: hide all windows expect those belonging to the active application’s1:1
- Hold Option while resizing window: change window dimension(s)2 around the window’s current centre point
- Hold Option-Shift while resizing window: change window dimensions around the window’s current centre point while maintaining aspect ratio
(See also Rectangle Pro.)
Special characters permalink
- Hold $KEY in text fields to get pop-up menu of given character with diacritic markings
- Control-Command-Space bar: open Character Viewer (emoji and symbols picker)
- Option-Hypen: insert en dash (–)
- Option-Shift-Hypen: em dash (—)
- Option-Close square bracket: opening single curly quote (‘)
- Option-Shift-Close square bracket: closing single curly quote (’)
- Option-Open square bracket: opening double curly quote (“)
- Option-Shift-Open square bracket: closing single curly quote (”)
You can also search the Character Viewer (Control-Command-Space bar) by name, for ‘en dash’ etc.
‘Hidden’ functionality permalink
Holding the Option key while clicking or hovering over a UI element can reveal additional functionality or information. Some examples: the Wi-Fi and Bluetooth menubar icons; the ‘Plus’ button when building a Finder search (allowing you to enhance the search logic); and application dropdown menus in the menu bar.
One I find useful is ‘Copy as Pathname’ in the Finder Edit menu:
Press the Option key to reveal additional functionality, such as ‘Copy as Pathname’ in the Finder Edit menu.Custom OS mappings permalink
You can assign application keyboard shortcuts in System Preferences > Keyboard > Shortcuts > App Shortcuts:
Set application shortcuts in System Preferences.- Control-Option-Command-M in Finder: run Window > Merge All Windows
- Command-Option-I in Preview: Adjust Size… from the Tools menu
- Shift-Command-Forward slash in all apps: ‘Show Help menu’ (to search menu items):
Rectangle Pro permalink
Third-party window manager. Includes window snapping à la Microsoft Windows. The keyboard shortcuts I use:
- Shift-Command-Enter: current window to medium size, centred (custom shortcut)
- Command-Option-Enter: ‘Almost Maximize’
- Control-Option-Command-Enter: full screen, with some padding, centred (custom shortcut)
- Control-Option-Command-Left Arrow: ‘Left Half’
- Control-Option-Command-Right Arrow: ‘Right Half’
- Control-Option-Command-Down Arrow: ‘Center’
- Control-Option-Command-Escape: ‘Restore’
Karabiner-Elements permalink
Third-party keyboard customiser that I use to open and switch between commonly used apps with a single keystroke. It’s generally more efficient than using a trackpad or mouse, Spotlight, LaunchBar or Command-Tabing.
I generally assign Control-Shift-$KEY to these.
- Control-Shift-U: launch/switch to Apple Music
- Control-Shift-C: Calendar
- Caps Lock3: Finder
- Control-Option-Shift-D: Downloads folder in Finder
- Control-Shift-F: Firefox
- Control-Shift-D: Firefox Developer Edition
- Control-Shift-G: Google Chrome
- Control-Shift-I: iTerm
- Shift-Caps Lock: Logic Pro
- Control-Shift-M: Microsoft Teams
- Control-Shift-N: Nova
- Control-Shift-S: Safari
- Control-Shift-P: Spotify
- Control-Shift-T: Terminal
- Control-Shift-R: Transmit
- Control-Option-Shift-V: Visual Studio
- Control-Shift-V: Visual Studio Code
Assign shortcuts by editing profiles[0].simple_modifications
in ~/.config/karabiner/karabiner.json4. For example, to open Firefox Developer Edition:
{
"from": {
"key_code": "d",
"modifiers": {
"mandatory": [
"left_shift",
"left_control"
]
}
},
"to": [
{
"shell_command": "open /Applications/Firefox\\ Developer\\ Edition.app"
}
]
}
Or to open Finder (or whatever you have assigned as your default file browser):
{
"from": {
"key_code": "caps_lock"
},
"to": [
{
"consumer_key_code": "al_local_machine_browser"
}
]
}
Open several Finder windows at specific locations permalink
I use Control-Option-Shift-J to open several Finder windows5 at locations relevant to my JazzKeys.fyi project:
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"left_control",
"left_shift",
"left_option"
]
}
},
"to": [
{
"shell_command": "open ~/Documents/dev/JazzKeys.fyi\\ process\\ files\\ \\(Hazel\\); open ~/Documents/dev/jazztoolkit/site/audio; open ~/Library/Mobile\\ Documents/com~apple~CloudDocs/Logic\\ projects/jazzkeys.fyi/Jamming; open ~/Library/Mobile\\ Documents/com~apple~CloudDocs/Logic\\ projects/jazzkeys.fyi/Licks\\ etc."
}
]
}
Third-party app-specific permalink
Some third-party apps which I find useful enough to assign keyboard shortcuts to. The shortcuts are defined within the apps themselves.
I generally assign Control-Option(-Command)-$KEY to these.
- Control-Option-C: open Copy ’Em (clipboard manager)
- Control-Option-F: Dato6 (menubar calendar app)
- Control-Option-Command-Space: DevUtils.app (developer tools)
- Control-Option-Command-F: Dropzone (file management and general productivity booster)
- Control-Z: Menuwhere (get the Mac menu bar wherever your cursor is)
- Control-Option-Command-N: Quick Note > new note
- Shift-Command-2: Snappy (take screenshots which remain in front of other windows) > new snap
- Control-Option-Command-C: System Color Picker (OS-wide access to an enhanced system colour picker) > pick colour
(I also use aText for text automation/expansion, but that’s probably a separate blog post.)
It depends on the position of the cursor on the window edge as to whether the X, Y or both X and Y dimensions are affected. ↩︎
I first disabled the Caps Lock key for its default purpose: search ‘Reset modifier keys’ in System Preferences and set ‘Caps Lock (⇪) Key’ to No Action. ↩︎
This location is accessible via Karabiner-Elements preferences under Misc > Export & Import > Open config folder […]. ↩︎
If you hold down Command while positioning the Finder windows, the OS should remember the coordinates. ↩︎
F because I used to use Fantastical. ↩︎
Recommend
-
84
magit-keys.el - Keyboard shortcuts for magit functions
-
78
Nowadays, I spend more time in Terminal, trying to accomplish more in CLI than GUI. I learned many BASH tricks over time. And, here is the list of useful of BASH shortcuts that every Linux...
-
56
README.md ? React Keyboardist ...
-
38
Interested to learn more about Eclipse keyboard shortcuts? Then check out our article on how to improve your productivity and make you more efficient.
-
49
Jorde Kang <-- back Setting up a keyboard to use as a shortcut board in emacs. This is a pretty simple hack you can use any keyboard for to...
-
51
ExDoc v0.20 has been released with many exciting new features: keyboard shortcuts, search improvements, and more! At Plataformatec, we are particularly happy and proud to have contributed and sponsored some of the work be...
-
38
Recently, I wanted to limit mouse usage when programming in Visual Studio Code since I found interacting with the IDE through a cursor distracting and a major flow-breaker — so, I tried navigating VSC with keyboard alone....
-
79
README.md Rectangle Rectangle is a window management app based on Spectacle, written in Swift. System Requirements Rectangle...
-
18
Us...
-
12
Ranked #7 for todayHomerowKeyboard shortcuts for every button in macOSFree OptionsKeyboard shortcuts a...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK