Sitemap
Ahmed Farghal

Ahmed Farghal

Engineer @Stripe. Ex-staff PE @Meta/Facebook. Sometimes people call me Ahmed Soliman. Opinions are my own. Nothing on this account is affiliated to my employer

My macOS keyboard setup for productivity

4 min readApr 13, 2022

--

Part of the series: productivity for the easily distracted. If you are unfamiliar with the modifier key symbols, check the legend at the bottom.

Press enter or click to view image in full size

Every time I get a new Mac, I spend some time setting it up for my productivity needs. Most of my workflows are keyboard-centric. It pays dividends to spend the time learning some new shortcuts or installing a utility that makes my keyboard more useful.

In this article, I go through how I set up my keyboard and talk about the essential navigation shortcuts that everyone should know.

Keyboard Setup

In “System Preferences ▸ Keyboard”, I set the key repeat rate to “fast” and delay to “short”. Honestly, I don’t know why this is not the default!

Press enter or click to view image in full size
Key Repeat is “Fast” and Delay is “Short”

Since I’m bilingual, I set ⌥+Space as a shortcut to change my keyboard language.

Press enter or click to view image in full size
Option+Space to change between keyboard languages

Setup Karabiner Elements

Karabiner Elements is a handy tool that enables tweaks from simple key remapping to complex modifications. You can find my basic karabiner configuration on my dotfiles repository.

I use Karabiner to do those critical modifications on all connected keyboards:

Use Caps Lock as ⌃ (Control) key. Caps Lock is an utterly useless key. Alternatively, I remap it to Control. This becomes handy when using tools like tmux. This way, my left pinkie finger can efficiently locate the Control key instead of hunting in between Fn and Option.

Get Ahmed Farghal’s stories in your inbox

Join Medium for free to get updates from this writer.

For those who prefer to remap to Escape, Karabiner also allows mapping Caps Lock to Escape if it was pressed alone, and to Control if it’s used as a modifier key!

Note: you can achieve the same in System Preferences ▸ Keyboard ▸ Modifier Keys, but Karabiner can ensure that it’ll stay applied on all my keyboards.

Map ⌃+i to F6. This is a hack I stole from Greg Hurrell. It makes it possible to set up vim to distinguish between ⌃+i and ↹ keys. I will discuss this further when I talk about my Vim setup. The original problem arises from the fact that Control+i and Tab keys map to the same ASCII code.

Setup Magnet

Magnet allows me to snap and tile desktop windows with handy keyboard shortcuts. I particularly enjoy setting windows to one-third or two-thirds of my screen with a finger snap!

Press enter or click to view image in full size
With Magnet, I can do that with Control+Option+Enter

I customised the shortcuts a bit, so this is how I currently use it:

  1. ⌃+⌥+
    Simple fullscreen. Similar to holding “Option” before clicking on the Enter Full Screen green button.
  2. ⌃+⌥+→ Sets the window to the right half of the screen
  3. ⌃+⌥+← Sets the window to the left half of the screen
  4. ⌃+⌥+L Sets the window to the right third of the screen (vim-inspired)
  5. ⌃+⌥+H Sets the window to the left third of the screen (vim-inspired)
  6. ⌃+⌥+T Sets the window to the right two-thirds of the screen
  7. ⌃+⌥+E Sets the window to the left two-thirds of the screen

Recent Tabs for Chrome

These days, I can’t live without the Recent Tabs extension for Chrome. I use it for a single purpose. It allows me to set a shortcut—my choice is ⌃+A—to return to the most recent tab after switching tabs. This is a game-changer!

Pressing ⌃+A multiple times now cycles between two Chrome tabs instantly. When I feel lost, and I don’t remember which tab I was in before, I simply ⌃+A to get back in the game.

Essential keyboard tips

Maybe you are already familiar with those, but I found that those who moved recently to macOS didn’t know those gems:

  • ⌘+Q Quit application.
  • ⌘+M Minimise window.
  • ⌘+Space Opens spotlight. For me, I use this shortcut for Alfred3 instead.
  • ⌃+⌘+Space opens the emoji/symbol viewer. I often use it when I don’t know what I’m looking for. Usually, I use Alfred’s snippets with Emoji pack.
  • ⌘+↹ cycles between applications, but use ⌘+` to cycle between open windows of the same application, i.e., chrome open windows. Also, you can include ⇧ to cycle in the opposite direction.
  • ⌘+W Closes the current tab (in Chrome, Safari, Finder, etc.) or the window of no tabs is open.
  • ⌘+⇧+T (Chrome/Safari) reopen the last close tab (opposite of ⌘+W)
  • ⌘+L (Chrome/Safari) jump to address/location bar.
  • ⌘+⇧+A (Chrome only) Search/jump between the open tabs. This is my primary method for moving between tabs and windows in Chrome.

Legend

⌘ Command, ⇧ Shift, ⌃ Control, ↹ Tab, ⌥ Option, ︎︎
Enter/Return, → Right arrow, ← Left arrow.

--

--

Ahmed Farghal

Written by Ahmed Farghal

Engineer @Stripe. Ex-staff PE @Meta/Facebook. Sometimes people call me Ahmed Soliman. Opinions are my own. Nothing on this account is affiliated to my employer