A mouse button may be remapped to the Ctrl button by RButton::Ctrl
. However the same code does not work for XButton1 or XButton2 as XButton1::Ctrl
. How do I make XButton1 work as Ctrl?
When I click the XButton on the mouse, Key History shows that LControl was pressed and released consecutively. Other letter-keys I pressed while XButton1 was pressed show up being pressed before the press/release of the XButton/Ctrl hotkey.
Turns out AutoHotKey is innocent, the culprit was the mouse I was using (Logitech M650)
It appears to send the XButton1 up/down command at once on release.
Switching to a different mouse fixed the issue and AHK works as expected.