Better Together: AutoHotKey and WinSplit Revolution

One of the quirks about my laptop is that the numpad is accessed by a mysterious [fn] key that doesn’t “show up” internally in Windows. As such, it’s apparently difficult to write commands that use it or any of the features it accesses. Instead of Send {fn}{F7} to decrease the brightness, for example, I’d have to do something more creative.

One of my favorite utilities is WinSplit Revolution, which is especially handy for large displays. Its largest feature is the ability to press Ctrl+Alt+[Numpad number] to quickly move the active window to the desired side/corner of a window. Sadly, Ctrl+Alt+[fn][numpad] on my laptop doesn’t generate a keystroke. So, AutoHotKey to save the day.

It made sense to map the row of keys on the right side of my laptop (from top to bottom: home, page up, page down, end) as I probably wouldn’t be overriding another important keystroke, and they are sort of near where the number pad would be. While WinSplit lets you manually assign keystrokes, I wouldn’t have been able to use the Windows key, and if I connected a USB keyboard with a real number pad (something I sometimes do) I wanted all of the program’s normal functionality available.

The AHK script is as follows:

;WinSplit Revolution Laptop Compatibility
#Delete::Send ^!{Numpad5}
#PgUp::Send ^!{Numpad8}
#PgDn::Send ^!{Numpad2}
#Home::Send ^!{Numpad4}
#End::Send ^!{Numpad6}

In plain english:

Win+Delete -> Center (fill/third/two thirds)
Win+Home -> Left half (half/third/two thirds)
Win+Pg up -> Top half
Win+Pg dn -> Bottom half
Win+End -> Right half

While I’d initially decided that Ctrl+Win+(relevant key) would be a good replacement, I decided that I could drop the Ctrl to simplify the keystroke. There are probably many other intuitive (or more functional) methods I could have tried, such as attempting to replicate all

Andrew Guyton
http://www.disavian.net/

Leave a Reply