I wrote 12 traces of code and made my keyboard do issues Windows will not


The one factor that Caps Lock has efficiently completed for me over time is by chance flip my completely regular sentences into SHOUTING. I nearly by no means apply it to goal, and it is taking on house on my keyboard.

So after years of pretending it served a goal, I really made it definitely worth the house. I put in AutoHotkey and used just a few traces of code to create shortcuts for particular duties that the Windows keyboard would not normally do. It made sufficient of my on a regular basis typing simpler that I began questioning why I’d left the important thing untouched for therefore lengthy.

Caps Lock does one thing helpful now

I turned one uncared for key into 5 shortcuts I really use

With the whole script, I gave Caps Lock 5 new capabilities:

Shortcut

What it does

Caps + A

Toggle Always on Top

Caps + T

Insert the present timestamp

Caps + U

Uppercase chosen textual content

Caps + L

Lowercase chosen textual content

Caps + Q

Put citation marks round chosen textual content

While it feels environment friendly to have 5 new keyboard shortcuts, the extra attention-grabbing half is my Caps Lock has change into a modifier for actions that I personally select. AutoHotkey lets me use Caps Lock because the prefix key in a {custom} two-key mixture. So urgent Caps Lock + A can produce an end result completely completely different from urgent A alone.

The best to grasp of all of the shortcuts that I created was Caps Lock + A. Once I deliver a window into focus and press that mixture, that window stays above the remainder. Pressing it once more removes the Always-on-Top attribute. The WinSetAlwaysOnTop perform in AutoHotkey helps this sort of toggle habits.

Caps Lock + T inserts the present date and time into no matter utility has focus, wherever my cursor is positioned. The script makes use of the ShipText perform to ship the formatted timestamp to the energetic window, so I can use the shortcut wherever I’m typing.

The intelligent half wasn’t AutoHotkey

It was turning Caps Lock right into a modifier Windows would not use this fashion

Yadullah AbidiMakeUseOf
Credit: Yadullah AbidiMakeUseOf

Rather than remapping Caps Lock, my script merely makes use of it as a prefix. It’s potential as a result of AutoHotkey has a custom-combination syntax that lets two keys act as a single hotkey. This additionally means Caps Lock retains its regular perform after I press it by itself, so I did not sacrifice the important thing simply to show it right into a shortcut key.

Already the Windows secret’s a standard modifier: Windows + E opens File Explorer and Windows + I opens the Settings app. I created combos within the house not already taken by Windows’ built-in shortcuts: Caps Lock + A modifications the energetic window’s Always-on-Top state. Caps Lock + T creates textual content that wasn’t there earlier than. Caps Lock + U and Caps Lock + L change chosen textual content, whereas ​​​​​​​Caps Lock + Q places citation marks round it.

Text shortcuts have to make use of the clipboard for a quick second as a result of the script copies the choice, transforms the copied textual content, sends the outcome again into the energetic utility, after which restores the clipboard. The final a part of the method is vital so the script would not intrude with different issues I copied.

So, with out changing Caps Lock or altering what it does by itself, I turned it right into a small keyboard layer for actions Windows would not present as general-purpose shortcuts.

I finished interested by the shortcuts as methods

They grew to become helpful after I went again to writing

acer nitro v 14 ai laptop keyboard close
Gavin Phillips/MakeUseOf
Credit: Gavin Phillips/MakeUseOf

It was solely after I went again to regular work and wasn’t intentionally attempting every mixture that the true check began.

I discovered Caps Lock + A to be essentially the most sensible instantly. I usually want a reference window whereas I’m writing; simply one thing sitting beside my draft. Pinning it’s a easy answer that does not require me to resize or rearrange home windows. This is a small change, however I do it sufficient every day for it to make an actual influence.

For my notes, Caps Lock + T appears like a pure match. I exploit it to report after I begin a check or course of, and if I simply need the present date and time in my draft, it is useful.

The case-conversion shortcuts might not be as flashy, however they’re simply as helpful. When I paste an all-caps sentence, I now have a constant technique to convert it to lowercase throughout the apps I exploit.

Caps Lock + Q is one among my favorites, regardless that I do not use it as usually because the others. The few occasions I’ve to show a phrase right into a citation, deciding on it and utilizing a shortcut feels far simpler than stopping to sort citation marks at both finish. I discover the benefit most when the choice is an extended phrase or a number of phrases.

The level was to fill the gaps, not reinvent the keyboard

Windows already has an important set of shortcuts, so I left them alone—there is not a must reinvent what already exists. This was really what made this experiment attention-grabbing. I used to be in search of gaps that improved my workflow and addressed these gaps.

None of the shortcuts I created have been revolutionary, however that was the sweetness. I created a setup that is easy sufficient to repeat and adapt, particularly when you already use AutoHotkey. Adapting this, or constructing on it, could add extra worth to your workflow.



Source link