A while back, I wrote about My Mac Setup (yes, shameless plug 😄). I have it pretty much tweaked to make me productive, but there was one thing that always bugged me.
Every time a native dialog popped, I couldn't tab through the buttons. For whatever reason, I just assumed that this was how it was in macOS but at the same time I was like how is this not available in the OS? Well tonight, I was being interrupted in my keystroke flow by a native dialog once again and hit the tipping point where I couldn't take it anymore.
A very quick Google (why did I not do this before), revealed it is indeed possible via settings buried deep in the Keyboard settings. Big thanks to this article, Use the Tab Key to Switch Between Dialog Buttons in Mac OS X. I am now a happy camper.
What other hidden macOS secrets or unobvious settings do you know that could help another dev out?
Photo care of Flickr user paultarr.
Top comments (28)
When working with multiple windows,
cmd + backtick
works wonders. It allows you to navigate between windows easily. Didn't know that was a hotkey until I was knee-deep into learning programming.I also switch between my trackpad and mouse every now and then, and I use a little app called ScrollReverser that lets me scroll normally (scroll up to scroll up, scroll down to scroll down) on a mouse and keep Apple's "natural gesture scrolling" for the trackpad.
@peter you probably have some tips?
I use Alfred a lot to find files, launch programs, jump into subreddits, DEV tags, and perform custom searches on dev.to, Thesaurus.com, Dictionary.com, EtymOnline.com, and many others.
I'm a religious user of
cmd+tab
andcmd+backtick
to switch windows... I haven't clicked the dock in ages.I use CloudApp to clipboard screenshots and screen recordings.
The most common keyboard shortcut that I feel like not enough people know about is
cmd + L
in browser to jump to the address bar. I find myself using that many times a day for keyboard-less navigation.Yeah, I made the dock as tiny as possible and set it to auto-hide. You can't actually remove it, so I modified the amount of time before the dock shows itself , e.g.
defaults write com.apple.dock autohide-time-modifier -int 60
, where int is a value in seconds.I actually realized I do have two use-cases for using the dock:
1) Opening a file that's saved to my Desktop / Downloads folder (both of which have "Folder" icons in my dock)
2) Related — dragging a screenshot file from my Desktop icon onto the Photoshop icon to open that file.
In both cases, that seems like the more ergonomic solution than
cmd+tabbing
to Finder and grabbing the file, or opening up Photoshop and then finding the file.Not strictly OSX but if you want to maximize keyboard usage I can't recommend surfingkeys enough.
Oh wow. I used Vimium a while back but stopped for some reason. I'll give this a try. Thank you for the rec.
Welcome! I forgot to mention my additional configuration is here although it's mostly skinning.
Yeah I discovered
cmd + backtick
about a month ago. Good stuff. There's alsoCTRL + ⬇️
which shows you all the windows of an application and then you can use the arrow keys to select a window, even if it is minimized.Let me suggest HyperSwitch, you can map it to cmd+tab instead of system's switcher and it will instead just apps show you all windows for all apps as does switcher on Windows...
It's in beta, but works on Mojave OK.
cc: @andy
Thanks for sharing Richard. I'll check it out when I have a chance.
Here are some tricks I love:
The tab through buttons trick helped me a lot now! Thanks Nick.
And I always change my screenshot folder to a Documents/Screenshots one. I maintain an iCloud backup of it, and it's great not seeing it fulling my desktop.
One secret that is so ubiquitous yet so simple that I often forget it's even there (until I have to use a Windows or Linux machine and mash the keyboard in frustration) is that in macOS every text input area (and I mean every one) responds to Readline key-combos. That is:
<cmd>+f
- Move forward one space<cmd>+b
- Move back one space<cmd>+a
- Go to the start of a line<cmd>+e
- Go to the end of a line<cmd>+p
- Go to the previous line<cmd>+n
- Go to the next line<cmd>+d
- Delete<cmd>+h
- Backspace<cmd>+t
- Transpose the two characters before and after the cursor<cmd>+k
- "Kill" text from the current cursor position to the end of the lineMy favorite Mac keyboard shortcut is ⌘-Shift-?, which brings up the "universal help search" dialog that all apps share. The best thing about this dialog is you can start typing the names of menu items, and you can use the arrow keys to reveal where each menu item lives!
I use it for:
1) Discovering menu options that I know must exist (eg in Illustrator which I only sporadically use and therefore never remember where anything is). It's much faster than the mouse for that.
2) Pretending that keyboard shortcuts exist for menu items that don't actually have shortcuts. For example, tagging an item with a color in the Finder.
⌘-Shift-?, "tag", down arrow, enter, type tag color
. Looks like a lot, but if you're a touch typist it's way faster than finding the mouse options.I believe that shortcut is cmd+shift+/, isn't it?
BTW There is app called CheatSheet, that when you long press CMD key it will show all keyboard shortcuts of current app then.
You're absolutely right - I'll edit my post. Thanks!
Just a heads up - as of 10.13 (iirc) there's a native shortcut for showing hidden files that doesn't require killing Finder -
⌘-Shift-.
One of my favorite features.
chunkwm and skhd combine a keyboard-driven interface and a tiling window manager to make the OSX experience as much like i3 as possible.
I use an app called SizeUp, and it works for me. I got it originally to mimic Windows' default keyboard behavior. It's free but gives you a message until you buy the license, which I did.
I then found out about Magnet, which as far as I know does the same thing as SizeUp. It's $1 on the App Store.
Chunkwm and skhd seem much more customizable though. Also it's free, which now I'm wishing I knew earlier about...
I'v been using Hammerspoon (hammerspoon.org/) for a while and added a Sizeup compatible script to get window management the way i want it.
Hammerspoon is a framework where you can add your own functionality (like clipboard management, window management)
Combined with mouseless/cVim (chrome plugin) means that i hardly ever use the mouse now days.
Use Homebrew; it's simpler than ports.
CMD+` switches between apps in a slightly more sane way than CMD+TAB.
Don't unplug monitors or let the machine go to sleep with an ethernet dongle in it unless you like pain.
Make the dock auto-hide and use as small an icon size as possible and sit on the farthest-right monitor (i.e. where you're least likely to open it)
Use spectacle so you can maximise windows and so forth with the keyboard like you can in decent window managers.
Treat everything as case-sensitive even when it isn't.
Install a better terminal than the shonky one that ships with the OS.
You can drag some of the random notifications off screen to get rid of them (not all).
Use the keyboard shortcuts to disable CMD-Q by mapping it to something obvious but safe like "invert colours".
Basically, if you're anything like me, you're going to have a bad time and you should practice damage control.
Yeah, I'm a big fan of Homebrew and spectacle. I mention them in my Mac setup in this post. I started scripting my setup. Not complete, but does the job for now.
alt + click the notification center icon to mute notifications. Lifesaver!
I started using fkill. It even integrates with Alfred. It even lets you kill apps running on a port, e.g.
fkill :3000
.