So End & a is @, End & r is ( etc. Colemak also has an AutoHotKey script for its layout, I'm doing something similar: https://colemak.com/AutoHotKey
And I hit these keys a lot when programming. I would have problems with AutoHotKey v1, but it was every couple of days or so—and I thought it was the keyboard, more on that later.
Here is what I have been noticing so far, superfluous key presses that AutoHotKey tags as "Ignored because it was generated by an AHK script" But that I can't see I'm generating in my script:
For:
Code: Select all
Home & w:: Send {Blind}{`{ DownTemp}
Home & w up:: Send {Blind}{`{ Up}
Code: Select all
20 039 d 0.11 Space
20 039 u 0.09 Space
24 147 s d 0.17 Home <-- layer modifier down
57 011 h d 0.12 w <-- home & w = '{'
A2 01D i d 0.02 LControl {
A5 138 i d 0.02 RAlt {
4C 016 i d 0.00 l { weird, why does MapVirtualKeyEx think my '{'
A2 01D i u 0.01 LControl { key is !^l, when +[ is less modifiers
A5 138 i u 0.02 RAlt {
57 011 h u 0.03 w <-- hot key over
A2 01D i d 0.02 LControl <-- who sent this?
A5 138 i d 0.00 RAlt <-- who sent this?
24 147 s u 0.00 Home <-- layer modifier up
4C 016 i u 0.01 l
A2 01D i u 0.00 LControl
1B 001 d 0.20 Escape
1B 001 u 0.12 Escape
4E 024 d 0.08 n
4E 024 u 0.11 n
But after moving to AutoHotKey v2 is was obvious now, since it happened so much I could exit the script, and no stuck modifiers while typing.
As a workaround, I created a windows keyboard layout using kbdedit and use that instead. It lets me remap End to Kana which is a modifier so that End/Kana & a = @.
The problem is that if I try to make a combination in AutoHotKey with Kana/sc147 & a, it then takes over Kana so that Kana & b will no longer generate a key. This was really surprising, I didn't think SetWindowsHookEx got dibs before keyboard layouts, but I guess the layouts don't convert their scan codes to virtual keys until DispatchMessage? Does anyone have documentation on how that flow works?
Another thing I noticed is that some keys use VK_PACKET via SendInput, and they don't generate shift modifier keypresses:
Code: Select all
DF 147 s d 1.58 Home
54 021 h d 0.38 t
E7 003B U d 0.00 ; <-- VK_PACKET
E7 003B U u 0.00 ;
54 021 h u 0.16 t
DF 147 s u 0.11 Home
DF 147 s d 1.23 Home
53 020 h d 0.45 s
A0 02A i d 0.01 LShift
30 00B i d 0.00 0
A0 02A i u 0.02 LShift
53 020 h u 0.16 s
A0 02A i d 0.00 LShift
30 00B i u 0.02 0
A0 02A i u 0.01 LShift
DF 147 s u 0.06 Home
Everything else in AutoHotKey v2 is great, it even has lambdas and closures—are you kidding me? I took all my janky v1 code and actually did it right, and as a programmer—it felt intuitive. Except that indexes start at 1, but I can see the logic for its audience. But its string escaping approach is the best I've seen out of any language, handling ' and " and \ and / without needing delimiters. Very nice.