Setting up a secondary macro keyboard with Karabiner-Elements
I previously wrote that I bought a gamepad keyboard, hooked it up to my Mac and configured it with Karabiner-Elements. On my work machine I’ve taken that idea one step further. I’ve hooked up a full sized keyboard and programmed all the keys to be shortcuts.
Using the Karabiner Complex Modification website, I put together a couple of key combinations. Then using Groovy, I wrote a small piece of code to write out the statements for the rest of the keyboard.
With that done, I have assigned keys to different functions I find myself repeating. For example, S is to capture a screenshot using SnagIt.
J is to capture the number and title of a Jira ticket using TextSoap. That text is then pasted into TaskPaper where I keep my test plan notes.
The numbers 1 and 2 are to remove or add carriage returns within my text using TextSoap.
I’m now watching how I work to see what steps I repeat and if those can be assigned to a keyboard macro.
Karabiner-Elements has turned out to be extremely useful and far more than just an amusing configuration experiment.
Putting this all together, I have text/code snippets assigned to TypeIt4Me, keywords tied into Alfred and Keyboard Maestro, and hotkeys assigned to a secondary keyboard with Karabiner-Elements. Fairly soon, I should be able to perform dozens of functions using either a single work or a single keystroke. It’s going to be sweet!
Other articles of interest:
- Setting up hot keys on the gamepad
- Setting up a secondary keyboard for macros
- More fun, and a gamepad, with Karabiner-Elements
- TextSoap 8 on Bundlehunt
- You really need to get TextSoap from Bundlehunt
- Inserting and Appending Text with TextSoap
- Entering and reading text GetText, SetText and SendKeys in Katalon Studio
- Keyboard Maestro makes a last minute appearance on the Party Barge
- How I Use TextSoap
- How and Why I Use 4 Monitors
Setting up hot keys on the gamepad
Now that I have the gamepad hooked into Karabiner-Elements, it’s time to start putting it to work. Hotkeys aren’t exclusive to tools like Alfred and Keyboard Maestro. Plenty of apps, and even macOS itself, supports setting up hotkey shortcuts.
One of the tools I use all the time is TextSoap. I use the cleaners to format text for blog articles. Articles are written in Scrivener, then pasted into WordPress. I use “1 Return to 2 Returns” to add line breaks to the text.
I also use the opposite filter a ton, “Multiple Returns to 1 Return”. This is to remove empty lines from text and bring it all together.
A third is, “Remove Duplicate Lines”.
I previously selected these using the Text Palette, which is pretty awesome, but it does require me to find each one separately when I want to use them.
However, under Preferences, TextSoap can assign a cleaner to a shortcut key. I now have those same cleaners assigned to 1, 2, 3 on the gamepad keyboard. A convenient timesaver there.
Similarly, shortcuts can be set up for the OS. Under Keyboard in System Preferences, it’s possible to set up shortcuts to menu commands within an app.
For example, if you want to use Markdown for your notes in DevonThink, you can assign a key to that menu option. If you assign Control-Option-M to Markdown Text in the menu, you now have a hotkey to that menu.
At this point I am going through and assigning my most frequently used commands to the gamepad keys. Even capturing screenshots with SnagIt has been changed from a 3 finger selection to using the C key on the gamepad.
Since I do that a dozen times a day, that will save a lot of keyboard travel.
At some point, I will investigate the application specific settings of Karabiner.
Other articles of interest:
- Setting up a secondary macro keyboard with Karabiner-Elements
- How I Use TextSoap
- Inserting and Appending Text with TextSoap
- TextSoap 8 on Bundlehunt
- Setting up a secondary keyboard for macros
- More fun, and a gamepad, with Karabiner-Elements
- You really need to get TextSoap from Bundlehunt
- Parsing Strings in Katalon – Split, Substring and Readlines
- Productivity Tools for 2020
- Making applications with Keyboard Maestro
More fun, and a gamepad, with Karabiner-Elements
After the initial success of using Karabiner-Elements with a keyboard I had laying around, I decided to move a step further by adding a gamepad to the mix and programming it with hotkeys. And it worked with great success.
The gamepad of choice, or rather, the gamepad on sale, is the BlueFinger Gaming Keyboard, which is in essence the left side of a regular keyboard.
Now, it's no Logitech or Razer, but I'm not going to use it that way. It's standard plastic all round, but it's got a decent size, feels sturdy enough and shows up as a generic keyboard. It was also $30, so many boxes checked there.
Next, with the help of a very cool website-Karabiner Complex Modification, I was able to create a list of my own custom rules, which are loaded under the Complex Rules tab.
Instead of pressing CAPS LOCK and then another key, I wanted one-click action. So, if I press A, I get Control-Option-Command-Shift-A.
Using the site, you can create a file that looks similar to the following, which shows the use of the modifier keys:
{
"title": "Keyboard Maestro Demo",
"rules": [
{
"description": "Keyboard Maestro A",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "a"
},
"to_if_alone": [
{
"repeat": true,
"modifiers": [
"left_gui",
"left_control",
"left_alt",
"left_shift"
]
}
]
}
]
}
]
}
The file can then be "installed" from the web based version of loaded in:
~/.config/karabiner/assets/complex_modifications
I have this set up for 15 keys on the gamepad. Using the site tool, you can set up key combinations that work for you. You could also set up Alt-A to mean a completely different key combination that Ctrl-A, when used on that keyboard.
There is more experimentation to come, but at each stage there has been success. It's possible to use a full-sized keyboard if you have space, or get a gamepad and program it with your hotkeys.
Karabiner Complex Modification
Other articles of interest:
- Setting up a secondary macro keyboard with Karabiner-Elements
- Setting up a secondary keyboard for macros
- Setting up hot keys on the gamepad
- More file management with Keyboard Maestro
- Making applications with Keyboard Maestro
- Wait for a Volume to Mount or Unmount/Eject in AppleScript
- Keyboard Maestro makes a last minute appearance on the Party Barge
- Set up Triple Click Mouse Button Action with Keyboard Maestro
- How I Use Keyboard Maestro
- Controlling and Selecting VPN Connections with Keyboard Maestro
Setting up a secondary keyboard for macros
After setting up several keyboard shortcuts within Alfred and Keyboard Maestro, it became clear that I was putting together some bizarre key combinations and odd hand gestures to make sure I wasn’t interfering with other applications. Then it occurred to me, don’t video and audio editors have dedicated keyboards for shortcuts? Can the same thing be done for keyboard macros?
The answer is, yes it can. And rather easily too, using a standard keyboard and Karabiner Elements.
You don’t have to buy a specialty keyboard or programmable keypad or anything else. You can use any USB keyboard you have lying around. I have dozens from all the Windows machines I’ve ordered throughout the years.
This also works for a Bluetooth keyboard, so it doesn’t have to be wired.
The easiest way to configure this is install Karabiner Elements and go to the devices tab. Turn off all the other keyboard except the secondary one you plan to use for macros.
Then select the Complex Modifications tab, and enable the option for Caps Lock key to act like “command+control+option+shift”.
And that’s it. If you click into Keyboard Maestro and for the Hotkey Trigger, hold Caps Lock and click another key, it will be seen as Command Control Option Shift + Letter.
Because we disabled the other keyboard in Karabiner, this only works for the secondary keyboard. Pressing Caps Lock and another key on your main keyboard behaves the way you could expect. It toggles the uppercase of the letter.
This works for the standard letter keys, numbers, the number pad and the Home, End, PgUp, PgDn, etc.
You should now have 50-80 macros keys to program depending on keyboard.
Other articles of interest:
- More fun, and a gamepad, with Karabiner-Elements
- Setting up a secondary macro keyboard with Karabiner-Elements
- Setting up hot keys on the gamepad
- Keyboard Maestro makes a last minute appearance on the Party Barge
- Set up Triple Click Mouse Button Action with Keyboard Maestro
- How I Use Keyboard Maestro
- Making applications with Keyboard Maestro
- More file management with Keyboard Maestro
- Controlling and Selecting VPN Connections with Keyboard Maestro
- Logitech Wireless Illuminated Keyboard K800
Recent Comments