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.
Final solution was made using PyHook
Many thanks to Peter Parente.