loading...
Cover image for Reveal your macOS Secrets

Reveal your macOS Secrets

nickytonline profile image Nick Taylor (he/him) Originally published at iamdeveloper.com ・Updated on ・1 min read

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.

Discussion

pic
Editor guide
Collapse
andy profile image
Andy Zhao (he/him)

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?

Collapse
peter profile image
Peter Kim Frank

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 and cmd+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.

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

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.

Thread Thread
peter profile image
Peter Kim Frank

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.

Collapse
dmfay profile image
Dian Fay

Not strictly OSX but if you want to maximize keyboard usage I can't recommend surfingkeys enough.

Thread Thread
peter profile image
Peter Kim Frank

Oh wow. I used Vimium a while back but stopped for some reason. I'll give this a try. Thank you for the rec.

Thread Thread
dmfay profile image
Dian Fay

Welcome! I forgot to mention my additional configuration is here although it's mostly skinning.

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

Yeah I discovered cmd + backtick about a month ago. Good stuff. There's also CTRL + ⬇️ 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.

Collapse
rbukovansky profile image
Richard Bukovansky

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

Thread Thread
nickytonline profile image
Nick Taylor (he/him) Author

Thanks for sharing Richard. I'll check it out when I have a chance.

Collapse
booligoosh profile image
Ethan

Here are some tricks I love:

  1. Change the Screen Shot Save File Location in Mac OS X
  2. Hide All Desktop Icons in Mac OS X
  3. Set a Screensaver as Desktop Wallpaper in Mac OS X
  4. How to Disable Swipe Navigation Gestures in Google Chrome for Mac - I used to accidentally swipe ALL THE TIME!!!
  5. GeekTool lets you customize your desktop a lot and add really cool widgets.
Collapse
salunmarvin profile image
Salun Marvin

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.

Collapse
dmerand profile image
Donald Merand

My 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.

Collapse
rbukovansky profile image
Richard Bukovansky

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.

Collapse
dmerand profile image
Donald Merand

You're absolutely right - I'll edit my post. Thanks!

Collapse
jballanc profile image
Joshua Ballanco

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 line

Collapse
ditn profile image
Adam Bennett

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-.

Collapse
samtsai profile image
Sam Tsai

One of my favorite features.

Collapse
dmfay profile image
Dian Fay

chunkwm and skhd combine a keyboard-driven interface and a tiling window manager to make the OSX experience as much like i3 as possible.

Collapse
andy profile image
Andy Zhao (he/him)

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...

Collapse
moopet profile image
Ben Sinclair

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.

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

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.

Collapse
devnore profile image
Simon Ingelsson

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.

Collapse
thibmaek profile image
Thibault Maekelbergh

alt + click the notification center icon to mute notifications. Lifesaver!

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

I started using fkill. It even integrates with Alfred. It even lets you kill apps running on a port, e.g. fkill :3000.

Collapse
chiangs profile image
Stephen E. Chiang

Using the automator to build custom scripts and services.
Example: shortkeyb to launch the most frequent programs like ides, terminal, and common batch file actions like rename/resize.

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

I came across this tweet with a helpful hint:

Collapse
nickytonline profile image
Nick Taylor (he/him) Author

Just discovered this little to tweak for new finder windows.