DEV Community

Cover image for Keyboard Automation to the Extreme
fischgeek
fischgeek

Posted on

Keyboard Automation to the Extreme

For those that share the same passion for making our computers work for us by any means necessary, one tool you'll need for that job is AutoHotkey.

While I could write a long post about the wonders of AHK, that’s not why I’m here. I wanted to share with you an incredibly powerful multi-keyboard setup. I personally cannot take credit for most of this, but we all have our own implementations.

Here’s the gist, I have 4 keyboards hooked up to my desktop. 1 primary and 3 extras for hotkey mapping. This is made possible by using LuaMacros and AutoHotkey. I have a full set of instructions here, but I’ll give a brief summary of what’s going on. Here’s a quick visual.

flow

I’ll talk about my gamepad keyboard first. I don’t use it for gaming, but rather dedicated Visual Studio key maps. This gamepad has three profiles and each profile has 14 keys. I use the first profile for basic Visual Studio shortcuts like build, re-build, format document etc., 5 are dedicated to just applying layouts. I use another profile for launching solutions.

My second full sized keyboard is primarily used for launching things (applications, docs, files, you name it). For example, if I want to launch or show the Slack window, I just simply push the S key on that keyboard.

But what if I want to launch or show the Slack window on a specific workspace? Well, it can actually interrupt key chords as well! So, S+1 will Show or launch Slack, then switch to the first workspace. S+2 will do the same for the second workspace. I can even add more keys to target a specific DM or Channel!

I also work with remote desktops quite frequently so, R+(1-9) will launch a saved remote desktop session.

The last keyboard I use is for manipulation of windows, files, text on the screen and more. Some quick examples here are: I tend to lose track of my mouse sometimes with having three monitors. And rather than going looking for it or shaking it like a monkey, I can push 1, 2, or 3 and the mouse will move to the center of the respective monitor.

Pushing S+D will sort my Downloads directory into sub directories of like files and remove stagnant ones.

S+U, S+L, and S+T will uppercase, lowercase, or title case the current selected string, respectively.

And a whole lot more! I hope you got something out of this!

Here's a good video of someone doing the same thing, though slightly different.

Top comments (1)

Collapse
 
fischgeek profile image
fischgeek

Bummer. That’s never fun. This doesn’t have key tracking but with a little tweaking it could. Also, all the settings are stored in my code and in git so they’ll never be lost.