macOS keyboard settings for Windows & Linux users
If you're like me, and you're coming from two decades of using Windows and Linux, you might want to keep using the keyboard shortcuts you're used to.
You might also be a programmer. In that case: even better.
- 2015-10-18: This guide was written for OSX 10.11 (El Capitan).
- 2017-04-14: Updated for macOS 10.12 (Sierra)
- 2020-10-27: Removed broken links and updated examples for macOS Catalina.
Goals
- Use a Swedish keyboard, with close-to-identical keybindings.
- Use Ctrl+S (Save), Ctrl+C (Copy), Ctrl+V (Paste), etc. (Clarification: Actually Cmd+Key but Cmd is in the same position as Ctrl).
- Use the same old finger setting you're used to, that includes AltGr
(or whatever key, but placed where AltGr used to be) for writing the usual.
characters
{}[]\|
etc. (I know this is very specific to the Swedish programming layout). - Use Ctrl+C to abort execution in a terminal (I'll be using iTerm).
- Improve the Alt+Tab experience.
Swedish Windows/Linux-style keyboard
I built a keyboard layout using Ukelele. It's available as a GitHub gist. Just follow the instructions in the README!
Use Ctrl+C to copy instead of Command+C, etc.
Our goal isn't explicitly to use Ctrl+C, Ctrl+S, etc. It's rather to let you use the same old hand/finger positions you are used to. Maybe even your trusty old windows/linux keyboard. That means, Command is going to be moved to Ctrl, Ctrl to Option, and Option to Command. That way, we're 90% there.
Now we're going to remap the keyboard modifier keys using System Preferences.
System Preferences
> Keyboard
> Press Modifier Keys
Button > Remap to:
For an Apple keyboard
Control Key | ⌃ | => | ⌘ Command |
Option Key | ⌥ | => | ⌃ Control |
Command Key | ⌘ | => | ⌥ Option |
For a Windows/Linux keyboard
⌃ | Control Key | => | ⌘ | Command |
⌥ | Option Key | => | ⌥ | Option |
⌘ | Command Key | => | ⌃ | Control |
Since macOS uses Command as the base modifier, we are one step closer to emulating the behavior in Windows/Linux.
Goals two and three achieved!
Use Ctrl+C to abort execution in a terminal.
I use iTerm2 for macOS, and you're going to have to change around some stuff for the key bindings.
Go to Preferences
> Keys
> Remap to:
- Control key = Left Command
- Left Option key = Left Option
- Right Option key = Right Option
- Left Command key = Control
- Right Command key = Control
Improve the Alt+Tab experience
There are two things going on. Since we've moved Command to Control, we can't press "Alt+Tab" anymore (Command+Tab duh), it's Control+Tab now. We don't want that. Also, Command+Tab for app switching in macOS is not a good experience for multi-window apps.
You'll need to install Hyperswitch. Once installed, set Option+Tab as the Window switcher key. Alt+Tab is back! It remembers your app history as long as you don't click on any Dock icons.