最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

autohotkey - Mapping Ctrl to mouse XButton1 - Stack Overflow

programmeradmin1浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 0

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.

发布评论

评论列表(0)

  1. 暂无评论