This is the first in a series of posts from Paladin’s technology team, providing insights for developers and other interested readers based on their professional experience.
I’m a believer in establishing a strong and efficient workflow for my work, and I recommend it to all developers. In time I’ve discovered a number of tricks and apps that give me essential, time-saving shortcuts. From the Caps Lock key to Spark.app, I want you to have access to these tips.
Caps Lock Remapping
Do you remember the Caps Lock key? How often do you use it? To be honest, after trying it once when I first learned to use a computer, I thought it was useless. Or is it really? It’s in a very good position, just under your pinky! Turns out you can actually use it to create a set of shortcuts for use across all applications.
How about remapping Caps Lock to a modifier key and using it every day?! It’s a great idea, even if I do say so myself. Let’s get started.
Step by Step
MacOS offers an option to remap Caps Lock to a different key, but unfortunately it’s very limited. You can choose only from Control ^, Option ⌥, Command ⌘ or the Esc key.
Replacing it with a single modifier key (e.g. ⌘) doesn’t help at all. It does not create more possibilities, it just adds an option to use the same shortcuts in a different key combinations. Caps Lock + S would become the commonly used Save action (⌘ + S). What can we do about it? We need to find a combination of keys that will not conflict with existing shortcuts. Using multiple modifier keys can help us to achieve that goal. You might say that we already use shortcuts that make use of multiple modifiers – that’s true, but have you seen a shortcut combined from all of the modifier keys? Not really, because it’s hard to use.
So we need to remap Caps Lock to a combination of Shift ⇧ + Control ^ + Option ⌥ + Command ⌘. We’ll have to install software to do it.
Karabiner is a powerful software that helps you customize your keyboard under macOS.
Please go to https://pqrs.org/osx/karabiner/ and download the latest version of the Karabiner-Elements app. Follow the installation steps displayed at the bottom of the page.
Karabiner-Elements is located under /Applications/Karabiner-Elements.app. Open it and follow the instructions described here. If you’re on High Sierra you’ll have to allow loading of the kernel extension due to changes in the security policy.
Now that we have the Karabiner software setup, we can enable a custom rule that will remap the Caps Lock key to a combination of modifier keys.
- Open the Karabiner-Elements Preferences and go to the Complex Modifications tab
- Click on the Add Rule button, then click on the Import more rules from the Internet button – The web browser will open on the Karabiner’s complex modification rules page
- Click on the Modifier Keys link, you’ll see a list of available rules
- Find the Change caps_lock key rule and click on the Import button – you’ll get redirected back to the Karabiner’s preferences
- Click on the Import button and voilà – the rule was successfully imported
- Under Change caps_lock key rules, find the Change caps_lock key to command+control+option+shift. (Use shift+caps_lock as caps_lock)
- Click on the Enable button
Finally, it’s time to verify if the Caps Lock key was successfully remapped.
- Open Karabiner-EventViewer and hit the Caps Lock key
- You should see something like this
Hooray! We’ve achieved our goal. We have a whole new shortcuts set that we can use everywhere: Caps Lock + A would become ⇧ ^ ⌥ ⌘ + A.
Bonus: You still can use the original Caps Lock functionality by typing ⇧ + Caps Lock key.
Now it’s time to make some real use of it!
As developers, we often switch between different apps. Looping through opened applications using ⌘ + Tab can be exhausting and inefficient. Clicking with your mouse or trackpad on the icon also is not a perfect solution. Sure, you can type an application name in the Spotlight Search (or similar launching software) but it’s good only for applications that you open once in awhile. How about using a global shortcut to launch or switch applications? If you do, it will change your workflow forever and you’ll never want to go back!
Many applications already support a global shortcut to open them. I prefer a single place where I can manage all of my global shortcuts with ease.
Spark is a powerful shortcuts manager. You can create a shortcut that will launch an application, run a script and many more! I’ve used it for several years now and it works perfectly! I highly recommend it. Though you may be able to find other software to do the job, here are instructions for using Spark.
- Go to https://www.shadowlab.org/softwares/spark.php and click on the Download button
- Unpack the downloaded Spark.zip file and move Spark.app to the /Applications folder
- Now open it with a double-click – you’ll be asked if you want to open it, since you downloaded it outside of the App Store. Just hit Open
Add new shortcut
Create a new global shortcut that will launch a text editor.
- Click on the gear icon and choose Application (or type ⌘ + 2)
- You’ll see an Application Action modal, click on the Shortcut input field
- Once it’s activated, type Caps Lock + E – that will capture our global shortcut
- Fill the Name field with Text Editor and select Launch action
- Now you need to choose an application to launch – click on the Choose… button and navigate to /Applications folder, then select TextEdit.app and click Open
- You can select from a few Options like: Launch hidden or Launch in background – keep it default for now
After these simple steps, your Application Action modal should look like this:
If you’re all set, click on the Create button. Your shortcut will appear on the list.
Please make sure that Spark Daemon is running. You can start it by clicking on the Start Spark Daemon at the bottom of the application window.
Now test it! Caps Lock + E should launch the TextEdit.app. Isn’t it awesome? 🙂
Go ahead and create a few more shortcuts for your favorite applications, like web browsers, IM apps, or mail clients. Play with them, switch between them! Give it some time. Once you master it, you’ll fall in love.
Michał Lipski is a senior developer at Paladin’s European office in Kraków, Poland.