DEV Community

Cover image for Remap and Set Global Hotkeys on Windows 10 with Auto Hotkey

Remap and Set Global Hotkeys on Windows 10 with Auto Hotkey

Nick Janetakis on April 22, 2019

This article was originally posted on March 12th 2019 at: https://nickjanetakis.com/blog/remap-and-set-global-hotkeys-on-windows-10-with-auto-hotke...
Collapse
 
juanfrank77 profile image
Juan F Gonzalez

Great post Nick! I've read several of your articles for sorting out my dev configs when I was given a Windows PC and still wanted to develop with the Linux stuff I'm used to. I'm not sure I'll do this hotkeys thing but I'll give it a go just as I did with tmux and vim (and ended up loving them).

Collapse
 
nickjj profile image
Nick Janetakis • Edited

Thanks.

The hotkeys are nice for saving time. Your frequently used apps and files / folders can all be 1 key press away.

I just set up a fun one yesterday (not covered in this article). I set up a hotkey to open a specific CSV file that I open on the first of every month to pay out affiliates for the previous month.

But I programmed the hotkey to open last month's CSV file, so it involved dynamically calculating the date and adjusting it by -1 month since I namespace my CSV files by a dated folder.

That looked like this:

#a::
thisMonth := A_YYYY
thisMonth += -1, D
FormatTime lastMonth, %thisMonth%, yyyy-MM
Run, scalc.exe D:\src\scripts\affiliates\%lastMonth%\payouts.csv
return
Enter fullscreen mode Exit fullscreen mode

It's so much faster to hit Win + a instead of navigating to that affiliates directory manually to open the CSV file.

Or... here's another one since I wrote this article last month. This one gets the hex code of the pixel color under your cursor and copies it to your clipboard.

#h::
MouseGetPos, MouseX, MouseY
PixelGetColor, color, %MouseX%, %MouseY%
StringLower, color, color
clipboard := SubStr(color, 3)
Enter fullscreen mode Exit fullscreen mode

The moral of the story is, with these hotkeys you can really customize your workflow to make it work best for you with little effort.

Collapse
 
gilblinov profile image
Gil Blinov

Good one. There's so much more that can be done.

I still have a script from 2012 to resize windows for side by side work and more.

Windows 10 has made this obsolete.