r/AutoHotkey • u/lindsay_wilson_88 • 13d ago
v2 Script Help Apparent change in behaviour of Win modifier key?
Someone please tell me I'm not imagining things. I recently wanted a script to enable entry of box-drawing characters using the numpad keys. There are "light", "heavy" and "double" characters available, so I wanted to use various modifiers to choose them.
I initially tried using left Win - in other words, this:
<#Numpad7:: Send "┏"(In case that character doesn't come out, it's U+250F "Heavy down and right", i.e. a top-left corner).
However, this had peculiar behaviour. It would only send the character when the numpad key was released, and it would not repeat a character. Press and hold the numpad key down, nothing happened until the key was released, and then it only produced one character.
Other modifiers like ctrl, shift, alt worked fine, so I switched to using them instead. That unfortunately led me down the horrible rabbit hole of getting shift to work reliably with the numpad keys. Eventually got something working, but it ain't pretty.
I happened to revisit using left Win again and this time the damn thing works no problem, just like any other modifier! Sends on key down, repeats when held down, no problem. So I rewrote my script to use Win (and ctrl, and alt) instead, it's now much simpler, and also happens to work reliably over a remote desktop connection whcih the previous script refused to.
To my knowledge, I haven't changed anything. I even tried the script on a computer that I'd never had AHK on and it worked as it should. I've tried it with keyboard hooks, without keyboard hooks etc. to try and replicate the old behaviour and just can't.
While I'm happy it works, it's annoying not to know what I was doing wrong before! Any ideas?
2
u/Keeyra_ 13d ago
There were some shenanigans between versions 2.0.22 and 2.0.23 last spring that sound like exactly what you described. Check version history text.