Additional buttons on mouse models are usually communicated as 'Button 6' and 'Button 7', etc. (buttons 4 and 5 are the scroll 'buttons'). Some mouse manufacturers send keyboard codes instead (like multimedia buttons or other custom codes).
For Windows and OS X Pynput only supports the left, right, middle mouse buttons however, so you'd be out of luck on those platforms as far as Pynput is concerned. If you are on Linux (with the X.org back-end), you can send and receive more buttons, from button8
all the way up to button31
, as well as scroll_up
, scroll_down
, scroll_left
and scroll_right
.
So depending on the mouse model you are using and your operating system, you may be able to get the right events for those buttons, be they mouse buttons or keyboard events. Register both a mouse and a keyboard listener, and print out the button value for on-click events for the mouse, and the key for keyboard press or release events, and see if you can get your side button to show up.
When not on Linux, if the specific mouse buttons are sent as a keyboard events, you are in luck and can use the keyboard controller to send the same events. If not, then Pynput can't send such mouse button events either.
That's not to say you can't send such button clicks at all, but you'd have to study the source code of the controller used for Windows or OSX and then see how the underlying framework would accept other button presses besides left, right and middle.