Skip to content

Instantly share code, notes, and snippets.

@cwonrails
Forked from lornajane/mac.md
Created October 10, 2017 17:30
Show Gist options
  • Save cwonrails/c49b6dddc3f18832526918fb15264d45 to your computer and use it in GitHub Desktop.
Save cwonrails/c49b6dddc3f18832526918fb15264d45 to your computer and use it in GitHub Desktop.
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
vim
chrome + vimium
shortcat
alfred
hyperswitch
spectacle
iterm2

General Shortcuts

Cmd + , (comma) to access preferences for the current app

Cmd + F2 focuses the top menu bar (you can turn off the machine from here)

Cmd + F3 focuses the dock

related: you probably want to turn off Ctrl + F1 which enables and disables the above! Look in the keyboard settings.

Lock the screen: Ctrl + Shift + eject/power or say "lock" to Alfred.

Spaces

These are a pain to set up but I love them because it means I'm looking at fewer apps on one screen and it's easier to jump to the one I want without a lot of Cmd + tab to switch between applications. To configure:

  1. Go to "Mission Control" using Ctrl + up

  2. Hover your mouse at the top of the screen (yes, I do have a mouse, I just had to go and find it out of a cupboard) and it will unfold to show a bar where you can add as many spaces as you like. Check the options in "System Preferences" -> "Mission Control" to decide whether you want this per screen or not. Mine are not, the space spans both monitors.

You can move between spaces with Ctrl + left/right or there are keyboard shortcuts to enable via the keyboard settings area which enable going to a specific space by number Ctrl + 1 etc. This probably is more useful if you don't allow the mac to re-order your spaces as it pleases (this is a setting, I like mine to stay where I put them but YMMV).

Apps

Switching windows within an app Cmd + backtick.

In iterm2, also press Cmd + Alt + [number] where the number is displayed in the window bar. For switching between tabs, you can use Cmd + number - this also works in Chrome. For other apps try Cmd + Shift + ] or [.

Alfred

Alt + space to run any program. Alfred can do a hundred more things than this, well worth more research!

Shortcat

Shortcat might be the killer app for me on OS X. It can "see" and make "clickable" more or less any control in an application, including the content. To use:

  1. Type Cmd + Shift + space

  2. If the thing you want is labelled in words, start typing the words or the first letter of each word. If not, type a dot/period, which will show everything.

  3. If the thing you want is now highlighted in blue rather than yellow, press enter.

  4. If not, hold Ctrl and start typing the label. When the highlight is on the thing you want, press enter.

Note that you will need to allow Shortcat some accessibility permissions to run. The installation process will prompt you or you can find it in "System Settings" -> "Privacy" -> "Accessibility"

Vimium

I have been using Chrome for ages with a hacked version of an old accessibility plugin; I just added vimium because I needed something to use on the day I got my new mac. And ... it's fabulous, I'm now using it everywhere :) If you're not familiar with it, it pops up a label on each clickable item in the viewable area, allowing you to click links, focus fields, etc.

The help file is really helpful but here are the commands I'm using the most:

To trigger the plugin:

  • f to open the thing you then click on in the same window
  • Shift + f to open the think you click on in a new window
  • Alt + f to open more than one thing in a new window (useful on search results where you want to open a few tabs of results)

Just press escape to get rid of the labels.

Site-specific Config for Vimium

Any sites that have keyboard shortcuts are pretty awful for keyboard users I'm afraid! I have some tools where I do use the keyboard shortcuts in the site itself rather than from vimium and for these sites, you can add an exclusion. Vimium's icon in your browser will default to letting you add exclusions for the current site - use * to turn it off completely for whatever page you are on.

Spectacle

App to move your windows around on the screen. It can put them in corners, in half the screen, on the other screen, or whatever. If it could put them onto another space as well, this would be perfect. As it is, it's pretty damn good and I love it (I had some built-in stuff and some madcap scripts to do these things on Ubuntu). Install it, set it to run on boot and then:

  • Window to other screen: Ctrl + Alt + Cmd + left/right super useful when demoing with tiled desktops
  • Window fullscreen (normal fullscreen, not mac fullscreen) Alt + Cmd + f
  • Window fills half of screen Alt + Cmd + arrow (arrow towards the long edge you want your window on)
  • Undo what you just did to your window: Alt + Cmd + z

This app is quite awesome and I need to get my muscle memory improved!

HyperSwitch

This makes Alt + Tab behaviour a little less weird, especially with spaces in play because you can set a preference to say that it should include windows from both screens but not from other spaces. This means that I use the Cmd + number shortcuts to get to a space, then Alt + tab to the app I want. With a small number of apps on each space, it's very manageable and this approach works well for me. I do have a bit of a habit with a lot of iterm tabs and tabs/buffers in vim as well but it does work, honest!

Hyperswitch can also often get windows that standard Cmd + tab can't see, and it doesn't interfere with it so you can continue to use both if you wish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment