There a mouse example in the PBP folder, it could help.

YES Mecanique EasyHID will help... but for Linux... i don't know