Keyboard shortcuts offer a quick and easy way to perform tasks on your computer and eliminate the need for extra clicks/button presses that you would otherwise need to make to carry them out.
Most operating systems, including macOS, have built-in shortcuts for different actions. However, these shortcuts are not as flexible as you might think. And even though you do get the ability to create custom shortcuts on your Mac, the functionality you get is limited to triggering only specific actions and services, and you do not get much control over customizing your keyboard.
Karabiner Elements, formerly KeyRemap4MacBook, arrives as a solution to keyboard personalization limitations on macOS. It gives you the ability to modify the behavior of all the different kinds of keys on your Mac keyboard so you can customize them to work exactly how you want. Not just that, with Karabiner Elements, you can even perform a multitude of other tasks as well, ranging from creating profiles and setting up device-specific modifications to altering the behavior of function keys and setting up complex modification rules.
Here is a guide discussing the potential use-cases of Karabiner Elements and how to use it to personalize your Mac keyboard to suit your requirements.
What Is Karabiner Elements?
Karabiner Elements is a keyboard customization software for macOS that lets you customize various aspects of your Mac keyboard. Using it, you can modify the behavior of pretty much all sorts of keys on your keyboard: everything from the regular/standard keys to both function and modifier keys. In addition, you can also create profiles and device-specific modifications for your keyboard, which is something that you do not get with a lot of keyboard customization utilities.
Likewise, another aspect that makes Karabiner Elements a preferred option for customizing Mac keyboards is its ability to let you perform complex modifications. Operations like creating hotkeys (kind of) to send key events, customizing the behavior of the mouse buttons, setting up hyper keys, and changing modifier keys are a few such modifications you can carry out with the software.
How to Install and Set Up Karabiner Elements
Installing and setting up Karabiner Elements on macOS is as simple as installing any other software.
First, head over to Karabiner Elements’ website to download the Karabiner Elements .dmg file on your Mac and run the installer. On the installer window, follow the on-screen instructions to complete the installation.
Once installed, follow the steps below to set up Karabiner Elements.
- Open Karabiner Elements (Karabiner-Elements.app) and click on the Open Security & Privacy System Preferences button that pops up as an alert.
- In the Security & Privacy window, click the Allow button towards the bottom-right of the screen to allow system software access. If the button is missing, restart your Mac and try again.
- Once you allow kernel extension, you will see two Keystroke Receiving alerts. Click on the Open System Preferences button on each.
- In the Security & Privacy window, click on the Privacy tab and tap on the padlock icon on the bottom left. Enter your login password to unlock access to these settings.
- Select Input Monitoring from the left-hand pane, and on the right window, tick the checkbox next to karabiner_grabber and krarabiner_observer.
- Press the padlock again to lock access and prevent further changes.
- If the Keyboard Setup Assistant window comes up, click on Continue to allow it to configure your keyboard layout.
How to Use Karabiner Elements on Mac
As we mentioned earlier, Karabiner Elements allows you to perform various kinds of keyboard modifications on your Mac. The following are the steps on how to perform these modifications and configure your keyboard.
1. Simple Modifications
Simple Modifications are modifications that involve changing the behavior of one key to that of another key. Using it, you can, for instance, make the Caps Lock key on your keyboard function as a Shift Key.
Follow the steps below to carry out a simple modification:
- Select the Simple Modifications tab from the Karabiner-Elements Preferences window.
- Click on the dropdown button next to Target Device and choose a target device, i.e., the device on which you want your key modifications to be active.
- Click Add item on the bottom left of the screen.
- Hit the dropdown button for From key and select the key to whose behavior you want to modify.
- Click on the dropdown button for To key and select the key whose behavior you want to apply to the key you selected in the previous step. For example, to make Caps Lock behave as a Shift key, select caps_lock as the From key and left_shift or right_shift as the To key.
2. Function Keys
Functions keys or F-keys are special-purpose keys that help you perform various operations on your computer quickly. However, of the 12 function keys, it is unlikely that you use almost every single one of them. So since these keys are left unused, it is best to remap them to other actions on your Mac to get more out of your keyboard.
To this end, you can take the manual approach and remap function keys on your keyboard right from the system settings. However, a better way to do this is to use Karabiner Elements, which offers you more control over customizing the behavior of function keys.
Check out the steps below to use modify Mac function keys using Karabiner Elements:
- Select the Function Keys tab in the Karabiner-Elements Preferences window.
- Tap on the dropdown button beside Target device to select the target device on which you want these changes to function.
- Click on the dropdown button next to the key — listed f1 to f12 — and select a behavior/action for that key.
By default, the Mac keyboard triggers special actions for the function keys when you press them independently (without the Fn key). However, if you want to change this behavior, tick the checkbox next to Use all F1, F2, etc. keys as standard function keys on the Function keys tab.
3. Complex Modifications
Complex Modifications is where Karabiner Elements excels over other keyboard modification utilities. Among its various use-cases, the ones where you can make the most of it is when you want to input the alternate characters on the keys without pressing the Shift key or when you want to modify your key behavior to auto-close brackets and quotes.
To carry out such key modifications, you have two options: write your own rule or import one from the internet. If you are just getting started, you can import a rule from the pre-built rules library and tweak it to suit your purpose.
To do this, you need to select a few options on Karabiner Elements. Below are the steps to help you with the same:
- Select Complex Modifications from the Karabiner-Elements Preferences window and click on Rules.
- Hit the Add rule button at the bottom-left and click Import more rules from the Internet (open a browser) to see available rules on Karabiner Elements’ website.
- Find a rule that meets your requirements or comes close to what you want to achieve and hit the Import button next to it. When prompted, click Allow.
- When the rule opens in Karabiner Elements, click Import to import it to your library.
- Click the Enable button next to the rule you just added to enable it.
Useful Karabiner Elements Rules
- Launch apps
- Change caps_lock_key
- Capslock + number => Function keys
- FN + Arrow Keys
- Keyboard shortcuts for Terminal apps
- Auto close brackets & quotes
- Maps Eject to Screenshot
Check out more Karabiner Elements rules at Karabiner Elements rules library.
However, if you prefer to go the manual route, you can use external config generators such as Goku or Karabiner’s own generator to create complex modification rules. With Goku, you get the ability to generate .json files, which you can edit and tweak to your requirements, whereas Karabiners’ web tool allows you to generate rules using its GUI.
Getting More Out of Mac Keyboard With Karabiner Elements
If you prefer using shortcuts for performing various operations on your Mac, Karabiner Elements can prove to be a valuable addition to your system. Using it, you can not only remap keys on your keyboard but also change the default behavior of pretty much all kinds of keys to suit your requirements.
Like we mentioned above, custom modifications is where Karabiner Elements shines. So if you manage to hang of using rules and tweaking them to meet your purpose, you can create shortcuts for pretty much all sorts of Mac operations, improve your input efficiency, and enhance your system interactions.