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.
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.
Share Improve this question edited Feb 13 at 0:31 user4157124 3,00214 gold badges31 silver badges46 bronze badges asked Jan 21 at 22:45 ArturArtur 1,18311 silver badges17 bronze badges 3- Similar question asked here, but answer didn't work: stackoverflow/questions/50360302/… – Artur Commented Jan 21 at 22:46
- 1 Try adding #InstallMouseHook. For v2: InstallMouseHook. – Relax Commented Jan 21 at 23:11
- Good idea, but doesn't fix it. Ctrl does work with MButton however – Artur Commented Jan 23 at 3:25
1 Answer
Reset to default 0Turns 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.