13 ms·
Ask HN: The most useful Mac keyboard shortcuts?
Ones that most people don't know about, that you actually regularly use. Thank you!
Edit: "Not a shortcut exactly..." tips are most welcome too.
- seltzered_ 7y agoCmd+shift+/ - brings up help search to search through menu items. Huge feature to me over windows, Linux-based desktop environments. Not exactly a shortcut, but I once made a gesture-driven shortcut app (https://thimblemac.com https://thimblemac.com) - it’s been on hiatus the past couple years but have been wondering if there’s value in it for programming work contexts.
- nXqd 7y agoHoly, this is really good. I have been using an extension on alfred for this purpose, now I can get rid of it. Thanks!
- psychometry 7y agoCmd+shift+/ doesn't work in any app I'm running. Did you set that up yourself?
- srfilipek 7y agoIt works in every single app that I'm running. Did you remap that key combo?
- psychometry 7y agoNope, just checked my keyboard shortcuts and it's not listed.
- sethammons 7y agoditto. no worky in chrome, vs code. In slack, it brings up emoji (which is pretty neat!). In Notes, it centers text.
- fnl 7y agoOP grandparent meant CMD-?, and ? happens to be SHIFT-/ on US and international keyboards.
- jhot 7y agoCMD + `/~ to switch between windows of the same app. Or if you're in the CMD Tab switcher will cycle through the list backwards.
- maximilianroos 7y agoNot exactly a shortcut, but https://contexts.co/ https://contexts.co/ completely changes Cmd+Tab; without it I would be materially less productive
- luckman212 7y agoThat looks nice. Is it working well on Mojave? Last update 8 May 2018, and the release notes don't mention anything. I own a similar app called Witch[1] from Many Tricks (the guy behind Moom). Also a nice Cmd+Tab upgrade. [1] https://manytricks.com/witch/ https://manytricks.com/witch/
- tenantless 7y agoWas wondering the same thing, the developer indicated it does via Twitter: https://twitter.com/contextsapp/status/1138209813714821120 https://twitter.com/contextsapp/status/1138209813714821120
- Austin_Conlon 7y agoIn Finder, Command-Shift-. (period / full stop) will show hidden files.
- jumelles 7y agoOption-clicking on things, e.g. the wifi status symbol, will give you more detailed/different information.
- Austin_Conlon 7y agoIf you hold down option in Xcode while cleaning the build from the menu, "Clean Build" turns into "Clean Build Folder" which applies to all targets.
- kevmoo1 7y agoNot a shortcut exactly, but remap caps lock to ctrl. So much easier in terminal and for using shortcuts like ctrl-A & ctrl-E for beginning and end of line, etc.
- gumby 7y agoIf you have a touchbar remap it to esc. I swapped my MBP for an air but kept the remapping.
- paulcpederson 7y agoThis is brilliant
- throw_away 7y agowith Karabiner, you can make it so that a tap of caps lock emits an escape, while still being able to use it as a ctrl modifier when pressed in conjunction with other keys: https://pqrs.org/osx/karabiner/document.html#configuration-complex-modifications https://pqrs.org/osx/karabiner/document.html#configuration-c...
- procinct 7y agoI don’t think karabiner elements supports that and I believe that the old karabiner no longer works with current versions of Mac OS
- brookter 7y agoThe latest version of Elements has supported this for several months, if not longer (I think they'd made it work for High Sierra at least, but I could be wrong about the exact timing.) I use it for both Caps Lock -> Escape/Control and Return -> Return/Control and it's indispensible.
- srik 7y agoOr to esc. Saves my vim pinky a lot of grief.
- randallsquared 7y agoNot a shortcut exactly, but get some app that adds shortcuts to snap the current window to various presets. I use Spectacle, but there are several.
- jachee 7y agoI use Magnet, which comes with very nice KB shortcuts for window manipulation. It adds on the one feature from Windows that I missed on macOS.
- SnowingXIV 7y agoAnother recommendation for Magnet. Using an ultrawide with my MBP it makes snapping windows around the screen really smooth and a key part of the workflow.
- MrLeap 7y agoI use BetterSnapTool. Gives me the same kind of "windows key + direction" usage that I came to love when I was a windows developer.
- jonbaer 7y agoShift+Cmd+4 for screenshot(s)
- khein11 7y agoI prefer Shift+Cmd+5
- conductr 7y agoWish this was easier to remember. I don’t do many screenshots yet I have ctrl/alt print screen burned in my brain and have to google this one every damn time
- ncr100 7y ago(joke ..) It's easy, just remember to add +1 from "Cmd Shift 3" .. the whole-screen screenshots shortcut. (seriously) Cmd Shift 4 also has AFTERTOUCH - so do the command, draw out the grey capture window, and keep holding the mouse button WHILE trying using different combinations of Ctrl, Option, and Shift. Allows you to resize your capture window. Without the initial SHIFT dumps the file to the Desktop. With the SHIFT adds the screenshot to your clipboard.
- xyzwave 7y ago+space to capture a single window.
- cygned 7y agoHold option to remove the shadow
- Austin_Conlon 7y agoPress space afterward to screenshot a particular window with an added drop shadow.
- vtrips 7y agoShift + Cmd + Ctrl + 4 for copying the screenshot into clipboard
- jonhess 7y agoCommand-e, put the selected text on the find clipboard. Then command-e, command-g (find next) will search for the selected text without sacrificing the copy/paste clipboard. Also, the find clipboard is shared between apps, so you can command-e in Safari, then command-g in Xcode.
- pier25 7y agoGet Alfred. Clipboard history will change your life.
- TheRealWatson 7y agoI've been using Copy'em Paste but Alfred looks like a beast.
- pier25 7y agoIt is a beast. If you are a dev you can extend it with scripts.
- ebg13 7y agoAnd eject a disk from the desktop.
- sethammons 7y agoNote, cmd+e seems to be a safari thing; no such luck in chrome. I just cmd+f again.
- keroro 7y agoIn chrome, cmd+e updates the search text, cmd+g starts the search and iterates through results, shift+cmd+g goes backward through the results
- AlchemistCamp 7y ago> cmd+e seems to be a safari thing Works fine on Firefox. I'd say breaking it is a Chrome thing.
- gumby 7y agoCmd-space Type a few characters: start or switch to an app. Just hide the dock. Keeps your hands on keyboard and your eyes where you want them to be. Control-cmd-F makes most apps full screen (or toggles back) ^k, ^y, etc...standard text widgets accept basic Emacs commands.
- gumby 7y agoFour finger swipe on keyboard slides between full screen apps (or spaces)
- sheepybloke 7y agoCmd-Space for me is the most powerful one! It makes life so much easier, and unlike the windows key, it's all front and center on your screen and easier to read.
- deleted 7y ago[deleted]
- analog31 7y agoThe one I remember best is Control-OpenApple-Reset.
- danaris 7y agoWhich is all very well, but Macs have never had an OpenApple or Reset key (the Command key used to have an Apple symbol on it, but now just has the cloverleaf symbol). Suggests your experience with Apple computers dates back at least to the '80s! :-D
- nevster 7y agoThat causes a reboot on an Apple IIGS!
- zuccs 7y agoSpectacle (https://github.com/eczarny/spectacle#keyboard-shortcuts https://github.com/eczarny/spectacle#keyboard-shortcuts) will change your life with better/faster window management. And Karabiner Elements (https://github.com/tekezo/Karabiner-Elements https://github.com/tekezo/Karabiner-Elements) to remap keys to something more useful (who uses Caps Lock anymore?)
- SkyPuncher 7y agoI use Karabiner to map symbols to the home row with a Caps Lock modifier. It's really nice to use k for "(" and l for ")". I don't have to reach up two rows.
- raihansaputra 7y agoFWIW, I use the Double Use Shift for parantheses. Tap left Shift for (, tap right Shift for ), and shift works as usual for normal typing and shortcuts. Karabiner is really an essential tool for me, especially this shortcut.
- SkyPuncher 7y agoOh wow. That's a really good one. Never thought about shift taps.
- SkyMarshal 7y agoIirc you can remap capslock in OS X settings, don't need an addon for that. Thought I'm sure Elements does a lot more than just that.
- deleted 7y ago[deleted]
- ebg13 7y agoSpectacle is great but abandoned. It hasn't been updated in years. Bug reports and PRs are piling up. It looks like someone else is currently working on a Swift rewrite. https://github.com/rxhanson/Rectangle https://github.com/rxhanson/Rectangle
- cheyne_nz 7y agoCmd up arrow and cmd down arrow for navigating through folders and opening docs. I miss this so much when I using Windows.
- aaronarduino 7y agoCmd + right or left arrow for home and end keys. I miss it so much on windows.
- koopuluri 7y agocntrl+a: go to start of a line cntrl+p: go up one line cntrl+n: go down one line cntrl+k: cut line proceeding cursor cntrl+f: forward one char cntrl+b: back one char These work everywhere you can type text on Mac: including in this HN text box, in the url bar, etc. I absolutely love these shortcuts...
- hnzix 7y agoand cntrl+e: end of line aka Emacs keybinds.
- grzm 7y agoIIRC, these are enabled by default if the text view is a standard NS* text view (don't recall the actual class). It's always a bit of a surprise when I find a window where these don't work, and that's a good indication that someone has implemented their own class for the text view. Little nugget holdover from those Unix-loving NeXT devs.
- chess93 7y agoI was wondering why these worked everywhere. I had no idea it was a mac feature.
- tobr 7y agoYou missed the best one, ctrl+t: swap the left and right characters adjacent to cursor. Fixes about 90% of typos. > These work everywhere you can type text on Mac Supposedly they even work on iOS if you plug in a keyboard, which is pretty unexpected if you think about it.
- jagger27 7y agoCommand-~ to switch between windows of the current program.
- jboldenz 7y agoShift-option-command-v: paste text without any formatting as opposed to simply using command-v
- i386 7y agoI used to sell a reasonably popular app on the Mac AppStore called Plain Jane that made that shortcut default. Code https://github.com/i386/plainjane https://github.com/i386/plainjane
- binarynate 7y ago⌘+shift+6 (touchbar screenshot)
- nevster 7y agoFor all those with Touch Bars - remap Caps Lock to be the Escape key
- aantix 7y agoAlfred 3's Clipboard History. I map it cmd-shift-v and I can bounce between all of my most recent clipboards. Saves so much time.
- scarecrowbob 7y agoI don't have alfred, but I've sincerely loved Clipy. Like, it totally changed how I use cut/paste: https://github.com/Clipy/Clipy https://github.com/Clipy/Clipy
- aantix 7y agoDoes Clipy support images? Alfred supports images, rich text and a few other mime types for its history.
- scarecrowbob 7y agoYes.
- pier25 7y agoAlfred is amazing. I just buy every new version even if I don’t use any of the new features to give money to the dev.
- notmuchserious 7y agoOption (or Alt) ⌥ + Down Arrow in Finder. Goes into selected directory.
- cygned 7y ago⌘^q to lock the screen
- sethammons 7y agothat quits my active window. I have to cmd+ctrl+q
- cygned 7y ago^ is the symbol for ctrl, sorry for the inconvenience
- sethammons 7y agodoh, my bad!
- aantix 7y agoVimium browser extension. Key commands generated to follow any link on the page. It makes browsing really efficient.
- kristjansson 7y agoCommand-<down arrow> to open the selected item in finder. A small convenience, but makes my finder usage completely mouse free.
- b3b0p 7y agoDidn't see Command + Shift + G mentioned when in Finder. "Go to the folder:"
- kohtatsu 7y agoFWIW tab completion works in that dialog.
- jb111122 7y agoEsc. I spend most of the time on chrome and esc key can close most of the annoying popups.
- elamje 7y agoIf you have a touchbar - https://pock.dev https://pock.dev is a huge improvement. Cmd-tab for switching between apps quickly. Takes a few days to get really good with it.
- xeno42 7y agoCtrl-Cmd-Space in most text edit fields to open the character viewer to enter emoji and other common unicode characters
- avelis 7y agocmd+delete = moves selected item to trash. shift+cmd+delete = empties trash bin. It's easily my goto combo to delete something fast.
- xeno42 7y agoIf you've used Cmd-C to copy something to the clipboard, pbpaste is really useful to pipe the clipboard contents into a pipe or to a file (pbcopy being the inverse)
- vinhnx 7y agomacOS: * command+O: open file * command+shift+3/4/5: screenshot tool (one of the best shortcut on macOS in my opinion) * command+alt+space: switch keyboard input source * "=", ">", "<" "-", while holding down `option` gives you "≠", "≥", "≤", "–" Apps: + Safari: command+shit+\ (show tab overview) + FileMerge: command+D to jump to next conflict + VSCode: control+shift+E: toggle focus + iTerm2: command+] to switch between panes + iTerm2: command+K: clear buffer + Dash: command+shift+D + Spectacle: https://github.com/eczarny/spectacle#keyboard-shortcuts https://github.com/eczarny/spectacle#keyboard-shortcuts. And also, as zuccs's comment https://news.ycombinator.com/item?id=20621517 https://news.ycombinator.com/item?id=20621517
- gt2 7y ago+ VSCode: CMD + b toggles the sidebar (whichever is open)
- jsonau 7y agoCommand+? (Command+Shift+/) Brings up the Help Viewer where you can search any menu items for the current app. This IS pretty much the built-in command palette for all apps!
- sambhu 7y agoctrl + command + 4 Saves screenshot in clipboard, saving your Desktop folder from screenshot clutter
- canthonytucci 7y agoHit space after to select a window to capture.
- fatninja 7y agoAnyone have a good keyboard shortcut to switch between two screens?
- szhu 7y agoLate to the comment party, hopefully this still helps someone! Probably the most important knowledge is to learn the Mac modifier key symbols, since they'll help you learn more shortcuts from the menu items you use. ⌃ Control ⇧ Shift ⌥ Option ⌘ Command ——— SCREENSHOTS ——— [⌃⇧⌘4] Copy screen selection to clipboard. In this mode: - Press [space] to capture a single window. - Hold [⌥] to toggle whether to include window shadow. [⇧⌘5] Show extra options, including screen record (10.14+) ——— MISSION CONTROL ——— [⌘MissionControl] Show desktop [⌘Tab] Switch between apps. In this mode: - Press Tab to go highlight the next app. - Press [⇧Tab] or [`] to highlight the previous app. - Press [Q] to quit the highlighted app. - Press [H] to un/hide the highlighted app. [⌘`] Switch between windows of the current app ——— TEXT EDITING ——— [⌥Delete] Delete word [⌥⇠]/[⌥⇢] Move cursor to next word [⌥⇡]/[⌥⇣] Move cursor to next paragraph [⌘⇠]/[⌘⇢] Move cursor to start/end of line [⌘⇡]/[⌘⇣] Move cursor to start/end of text field ——— FINDER ——— [⌘Delete] Move to trash [Enter] Rename selected file [⌥⌘V] Move copied file here - You can see this option if you open the Edit menu and hold down [⌥]. ——— DRAGGING ——— - You can drag the "document proxy" icon in any titlebar. Make sure to hold the icon for a bit before dragging. (This delay is probably to prevent people who want to move the window from dragging the icon.) - If you're dragging a file into a folder, press [Space] to immediately open the "spring-loaded" folder. - In many apps, hold down [⌥] to duplicate instead of move. - In Finder, dragging a file across filesystems will duplicate by default. Hold down [⌘] to move instead. - You can [⌘Tab]/[⌘`] while you're dragging an item. - To navigate a open/save dialog to a particular place, drag the folder or file into the edges of the dialog. Be careful not to drag it into the middle white area of the dialog, as in some cases it might move/copy the file. - To open a Finder window at the same location as an open/save dialog, use [⌘R] (R for "reveal"). ——— (Note: There are many more shortcuts in each category. These are just the ones that I find the most useful.)
- deca6cda37d0 7y agoCMD + CTRL + Q Lock screen
- drcongo 7y agoAdd in a shift and it logs you out too.
- matijs 7y ago⌘-] and ⌘-[ to navigate between items like conversations in messages or Slack. Seem to be a fairly de facto shortcuts.
- oumua_don17 7y agoCmd+Shift+G, in any finder window. Go to Folder with keyboard nav, very handy.
- aiyodev 7y agoDoes anyone know a way to assign a keyboard shortcut to show and hide a specific app? I love this feature in iTerm2 and would like to have it for my browser and text editor as well.
- drcongo 7y agoI have it set up in Keyboard Maestro. It's useful, as if you also use Keyboard Maestro's app switcher (Cmd+Tab), you can set that up to never show certain apps in the switcher - apps like Spotify and Tweetbot that I always have open, but clutter the switcher.
- aiyodev 7y agoI'll check it out. Thanks for the tip.
- nikivi 7y agoI remap every single key on my keyboard into custom modifier. So my caps lock is escape on single press and cmd/opt/shift on hold. My control key is a. My command key is e. I open apps by pressing w + <key>. ie w+l opens VSCode. Press it again and it switches to previous app (under the hood w+l calls a Keyboard Maestro macro). It’s quite awesome. https://github.com/nikitavoloboev/dotfiles https://github.com/nikitavoloboev/dotfiles
- rayascott 7y agoMac Keyboard Shortcuts for a comprehensive list: https://support.apple.com/en-gb/HT201236 https://support.apple.com/en-gb/HT201236
- cimnine 7y agoCtrl+Shift+Eject/Power: Turn off the screen; Cmd+Alt/Option+Eject/Power: Send macOS to sleep
- spiffytech 7y agoThe Contexts app makes Cmd-Tab behave like it does in Windows, switching between windows, and only ones on the current Space.
- xz0r 7y agoHot corners. I have top right corner as put display to sleep. So I can just walk away from my Mac at work if I want to go grab a coffee or something.
- w4tson 7y agoMe too! It’s a great tip
- BGthaOG 7y agoCommand + Control + Q Locks your screen
- nairobi222 7y agoCmd up arrow and cmd down arrow for navigating through folders and opening docs. I miss this so much when I using Windows
- kahlonel 7y agoCtrl+Left and Ctrl+Right for desktop switching without using mouse.
- sethammons 7y agoThe biggest thing I missed going from Ubuntu to Mac was the ability to take your current active window with you when you switched workspaces using only the keyboard. In Mac, you have to use a mouse. Now I only use the other workspace/desktop as a quick way to get a clear screen to access something on the desktop like a recent screen shot.
- tsar_nikolai 7y agoCMD + SHIFT + G to navigate Open/Save dialogs with the keyboard. Supports autocomplete with TAB. Navigate multiple suggestions with UP/DOWN arrow.
- dochench 7y agoHammerspoon. Lets me define my own keybindings.
- sethammons 7y agoI like ShiftIt (free) for basic window management. I have opt+ctrl+cmd+[arrow] set to move my active window to that part of the screen. Ie, left arrow has that active window take up the left half of my screen. I then cmd+tab to another window and put it on the right side. Super quick for my window management needs.
- dyeje 7y agoYou have to turn it on in accessibility settings, but ctrl + scroll to zoom in.
- dreamcompiler 7y agoIn the Finder, cmd-shift-A opens Applications folder cmd-shift-U opens Utilities folder cmd-shift-L opens ~/Library (might not work on older versions or if ~/Library is invisible) cmd-shift-H opens Home folder cmd-shift-C opens toplevel computer folder cmd-[ "Back" button for Finder windows cmd-] "Forward" button for Finder windows cmd-1 changes window to icon view cmd-2 changes window to list view cmd-3 changes window to column view cmd-4 changes window to cover flow view
- seanwilson 7y agoNot a shortcut exactly, but turn on the "zoom" accessibility feature bound to something like CMD. You can then zoom in anywhere on the screen by holding the shortcut and doing a two finger gesture. Useful for reading small text, checking some CSS rendering close up and to point out a feature on the screen to someone nearby.
- rexf 7y agoCmd + Shift + F3 is one that I'm using periodically. This will show your desktop (files).
- source99 7y agoThe app witch lets you command-tab to switch apps but it lets you choose any open window of any app. So if you have 4 separate terminals and 3 chrome windows and multiple word documents open you can scroll to the exact one that you like
- Oldham-Made 7y agoSetting a text replacement (sys-prefs > keyboard > text) for "@@" to your email address. It's something we type multiple times a day, it's important to not have a typo, and @@ is something you rarely type in any context. This works with most apps, though some won't allow the text replacement to apply.
- HerrBertling 7y agoLate to the party: CMD + L selects the URL of your tab. Comes in quite handy for sending URLs to people. CMD + L => CMD + C => done :)
- rjb102 7y ago⌘⌃D -- looks up whatever word the cursor is hovering over or whatever text has been selected. Works system-wide except (irritatingly) in Microsoft Office.