How to not use a Mouse on OSX
This is a list of OSX hotkeys for common apps. They can be used in place of many mouse/trackpad operations to speed up workflows.
Here’s an example of the kind of thing you can do…
Example
Here’s how I would send someone a link to a line in my dotfiles on slack.
- Is Chrome open?
- No
⌘ + space
to open spotlight- Start typing
chrome
until spotlight finds Chrome (this usually only requires me to typec
) then hit Enter to open Chrome
- Yes
⌘ + Tab
to open a list of running applications- hold
⌘
then hitTab
until you get to Chrome
- No
- Does Chrome have an open window?
- No -
⌘ + n
to open a new window - Yes - skip this step
- No -
- Are you in a new tab?
- No -
⌘ + t
to open a new one - Yes - skip this step
- No -
⌘ + l
to highlight whatever is in the address bar- type
git dav dot
in the search bar; Chrome will look through my history for a URL that matches each of these strings. When I see the URL I want in the suggestions, I hitTab
to get to it and thenEnter
to go to it. I’m now in the github repo. t
to enter search mode in the github repo- start typing
alias
into the search until.aliases
is the first choice (usually only takesal
) then pressEnter
y
to switch the URL to reference the SHA of file’s current commitl26
to highlight the line I want to send, line 26⌘ + l
to highlight the current URL⌘ + c
to copy the URL- Is Slack open?
- No
⌘ + space
to open spotlight- Start typing
slack
until spotlight finds Slack (this usually only requires me to typesl
) then hit Enter to open Slack
- Yes
⌘ + Tab
to open a list of running applications- hold
⌘
then hitTab
until you get to Slack
- No
⌘ + k
then type in the first few letters of the person I want to send the message to, then hitEnter
⌘ + v
to paste the URL, thenEnter
to send
Boom. No mouse clicks!
General OSX
⌘ + c
= copy⌘ + v
= paste⌘ + V
= paste without formatting⌘ + x
= cut⌘ + b
= bold selected text⌘ + i
= italicize selected text⌘ + u
= underline selected text⌘ + z
= undo⌘ + y
= redo⌘ + m
= minimize current window⌘ + n
= open new window⌘ + `
= toggle open windows of current program⌘ + f
= find text⌘ + a
= select all⌘ + p
= print⌘ + s
= save⌘ + q
= quit application⌘ + w
= close current application window⌘ + Tab
= switch to last application⌘(hold) + Tab
= view open applications, while still holding⌘
:Tab
= select next running application←/→
= select previous/next running applicationq
= quit selected applicationn
= open a new window for the selected application- (release
⌘
key) = switch to selected application
⌘ + space
= open searchlight
When in a text-editing context:
OPT + delete
= delete previous word⌘ + delete
= delete to beginning of line⌘ + Shift + ←/→
- select to beginning/end of line⌘ + Shift + ↑/↓
- select to top/bottom of documentOPT + Shift + ←/→
- select previous/next word⌘ + ←
= move cursor to start of line⌘ + →
= move cursor to end of line⌘ + ↑
= move cursor to top of document⌘ + ↓
= move cursor to bottom of documentOPT + ←
= move cursor to start of current wordOPT + →
= move cursor to end of current wordFN + delete
= forward deleteSHIFT + ↑/↓
= select up/down one line
Chrome
⌘ + f
= find text⌘ + t
= open a new tab⌘ + l
= highlight URL of current page⌘ + OPT + ←/→
= move to previous/next tab⌘ + w
= close tab⌘ + r
= refresh tab⌘ + R
= hard refresh tab⌘ + -/+
= zoom out/in⌘(hold) + l + ENTER
= duplicate current tab⌘ + ←/→
= go to previous/next in history⌘ + 9
= jump to last tab⌘ + (1-8)
= jump to n-th tab⌘ + C
= view DOM, dev tools- type search string into address bar to run google search
- use
Tab
to move to next auto-completed suggestion - use
Tab
to move cursor to next search option, enter to select
- use
Requires 3rd-party applications:
⌘ + \
= open 1password
Gmail
gi
= navigate to inboxgt
= navigate to sent folder/
= to searchj
= move cursor down (to previous email)k
= move cursor up (to next email)s
= star/unstar the current emailx
= select current email* + u
= select all unread emails* + a
= select all emails in current scopec
= enter compose mode (must be in inbox)
Once you are in compose mode:
Tab
= move between to/from, subject, and body fields⌘ + ENTER
= send email
Once one or more emails have been selected you can:
I
= mark as readU
= mark as unread=
= mark as important-
= mark as unimportante
= archive it* + n
= deselect allENTER
= view selected email
Once you are in view mode for a given email you can:
r
= reply to emaila
= reply all to emailf
= forward emailu
= go back to thread-view
iTerm
I highly recommend mapping your Caps Lock key to CNTL
The following hotkeys work even with Tmux
CNTL + a
= jump to start of lineCNTL + e
= jump to end of lineCNTL + u
= delete to beginning of lineCNTL + c
= delete entire lineCNTL + r
= search for previous commands containing search stringCNTL + p
= repeat last commandCNTL + b
= go back a characterCNTL + d
= delete forwardCNTL + w
= delete back to previous spaceCNTL + f
= go forward a character
Won’t work in Tmux session
⌘ + d
= split screen vertically⌘ + SHIFT + d
= split screen horizontally⌘ + w
= close terminal window⌘ + OPT + arrow key
= move between terminal windowsCTRL + k
= delete to end of line (I mapped this to move to lower tmux pane)
Github
t
= search repository by file nameESC
= exits search mode
w
= search repository by branch name?
= open list of hotkeysgi
= jump to issuesc
= create issue (when on issues page)
gc
= jump to codegp
= jump to pull requests
When viewing a code file:
y
= change URL to reference the specific commit SHA of the code you’re looking atl
= go to line
Slack
⌘ + k
= search for and jump to conversation
Vim
Vim is a text editor that allows you to completely avoid using a mouse. I use these commands most often in Vim.
Tmux
Tmux allows you to manage windows and panes in your terminal without using a mouse (among other things). Here’s a list of the commands I most often use in Tmux.
Sublime
⌘ + n
= open a new tab⌘ + OPT + arrow key
= move to tab⌘ + w
= close tabSHIFT + ↑/↓
= highlight line above/below⌘ + ←/→/↑/↓
= jump to start/end of line or top/bottom of the doc⌘ + SHIFT + ←/→
= highlight to beginning/end of line⌘ + SHIFT + L
= open cursor on each highlighted line⌘ + CTRL + G
= open cursor at each instance of highlighted text⌘ + D
= open cursor at next instance of highlighted text⌘ + P
= find file by name⌘ + SHIFT + F
= grep for string through entire directory⌘ + R
= jump to symbol on current page