AutoHotKey Experience on Windows: I am loving it 🤓
Kaustubh Joshi

Kaustubh Joshi @elpidaguy

About: I love coding, drinking coffee and connecting with people from diverse backgrounds. #FOSS

Location:
India
Joined:
Jul 6, 2021

AutoHotKey Experience on Windows: I am loving it 🤓

Publish Date: Jun 2
4 2

This is not a Tutorial 🚦

Hello fellow developers,
are you forgetting the ways of the nerd development experience because you use mouse for (very) simple tasks? Do you feel like you have sinned because you are forgetting the default Windows keyboard shortcuts? Do you want custom Windows key binds so that you can do a chain of tasks with the pattern you can remember?

Fear not, I bring to you -- AutoHotKey !!
And this post will be a small yap about my AutoHotKey experience.


Don't know what AutoHotKey is? (it's 2025 😐)

AutoHotKey is a very lightweight scripting tool available on Windows where you can create your own key-binds, automated tasks and macros.
These scripts are very easy to learn and backed up by a huge open source community.
So, when you are too tired to learn another script syntax, you can always browse what others have made in the community. (Is it safe though?)


My Use Cases 🫡

I have been using AHK mostly for Keyboard shortcuts and key re-mappings, following are the few which has helped me a lot.

Close Window

Re-Mapping traditional Alt+F4 key for closing the window to Alt+w:

!w::Send "!{F4}"
Enter fullscreen mode Exit fullscreen mode

Delete Entire Line

When coding, I need to press multiple keys to delete the entire line, and keep cursor at the end of the line, so I pulled this one from a StackOverFlow answer:

 ^d:: Send "{Home}{ShiftDown}{End}{Right}{ShiftUp}{Del}"
Enter fullscreen mode Exit fullscreen mode

Toggle Hidden Files

Win11 comes up with confusing UX, and it is not very reliable to check/uncheck the hidden file box to see the dotfiles, I 'Yoinked' this one from a quick duckduckgo search:

 h::
{ 
 HiddenFiles_Status := RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden")
 if (HiddenFiles_Status = 2)
 RegWrite(1, "REG_DWORD", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden")
 Else
 RegWrite(2, "REG_DWORD", "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden")
 Send("{F5}")
 return
}
Enter fullscreen mode Exit fullscreen mode

References 🪤

🔗 How to Setup?
🔗 More Examples
🔗 Not a first AHK dev.to post


Finally 👌

AutoHotKey is a great plugin which you can start using today and optimize your day-to-day development experience by focusing your fingers more on the Keyboard and less on the Mouse.

I may write another (big) post which would go in-depth on how to write these scripts to align with your needs, but no promises!

Happy Coding!!!

Comments 2 total

  • Oscar
    OscarJun 3, 2025

    This is really cool. It feels like a Windows'y version of i3 or Neovim bindings.

    • Kaustubh Joshi
      Kaustubh JoshiJun 3, 2025

      Exactly, I started searching for this after using similar bindings on KDE for few weeks.

Add comment