I am trying to use my mouse as remote on my laptop and I would like to use side buttons in them. I am coding in python as I have already succeeded doing it with autohotkey. But autohotkey uses too much resources. The mouse is Razer Orochi.. It has 7 buttons and a scrollwheel. I would like to use left side front key for modifier and lbutton, rbutton, mbutton and wheel as secondary... also by pressing both left side buttons I would like to lock the mouse until 4 buttons, all of them on sides are pressed... Yet I can't seem to figure out how to read input from side buttons on mouse in python.
Asked
Active
Viewed 1,161 times
2
-
Depends on the platform, I would think. But it sounds like you are using Windows. I'd guess you'd have to hook into the user32.dll or something. – aus Sep 30 '11 at 20:58
-
Ok... Yes, I'm using win It should work on both 7 and 8... Sounds like pretty advanced stuff.. Any help? – Renee Undrits Sep 30 '11 at 23:33
2 Answers
0
Final solution was made using PyHook
Many thanks to Peter Parente.

CharlesB
- 86,532
- 28
- 194
- 218

Renee Undrits
- 21
- 3
0
This isn't quite an answer, but maybe a set of references to start you out. I don't have experience with Python on Windows, but it looks like these might be helpful:
- there's a set of Windows Extensions for Python: pywin32.
- Yak created a two-finger scrolling driver by reading the COM in a special way in Python here.
Judging by how Yak got two-finger scrolling in his code, I imagine what you're doing is not so far off? I also think win32com
would help you out.

Ehtesh Choudhury
- 7,452
- 5
- 42
- 48