The following URLs show how to have an autohotkey, log all keyboard and mouse events, and how to look at the log autohotkey generates these events.
Based on this, you can learn about all mouse and keyboard events by creating an autohotkey script as such:
#InstallKeybdHook #InstallMouseHook
After running the script, you can double-click the tray icon for this script, then go to the "View Key History and Script Information (Ctrl K)
Based on this information, I found out that my mouse driver is already overriding additional mouse buttons to other keys. However, I can rearrange these keys by going to "Control Panel"> "Mouse", selecting the desired button and using the "Macro ..." parameter in the mouse configuration (this is a special configuration only for Microsoft Wireless Laser Mouse 6000 v2). In the macro dialog I can determine the keystrokes for these mouse buttons to send (only one per mouse button). Then I can use AutoHotkey to view any keystrokes that I defined and perform certain actions based on those keystrokes.
source share