Mouse button events/keycodes

Hello,

I have expanded my keybinding script with the mouse events. But my mouse got 12 buttons while i can only set 3 of them. Are there more key codes(or where to find them) then found here? https://www.blender.org/api/blender_python_api_2_59_0/bge.events.html

Atm its just:
bge.events.LEFTMOUSE
bge.events.MIDDLEMOUSE
bge.events.RIGHTMOUSE
bge.events.WHEELUPMOUSE
bge.events.WHEELDOWNMOUSE

bge.events.MOUSEX
bge.events.MOUSEY

I want all other buttons as well if possible, like button 4 and 5 etc (thumb buttons for example).
I tried to listen to my mouse and see if the button returns a key code but nothing.

I don’t think there are, I’m sorry to say. At least not in vanilla BGE. I know nothing about UPBGE, but it might be a thing there, and if not it should be suggested.

I don’t think there are

I hope there is haha, i just wonder due to the fact its in full name on the site while there are int numbers for buttons aswell.
I can’t seem to find those. Like left click is 190, mousex 196, mousey 197 etc (out of my mind). I thought maybe there are more codes then the site had shown as strings.

This depends on your mouse driver. The standard mouse has three buttons, a wheel and provides screen coordinates. (That is what the BGE expects)

Mouse devices with more buttons come typically with some setup applications to allow the mapping from mouse button to OS-operations such as open application, mimic keyboard input and so on. You would need to change the BGE source code to read more buttons from OS (if that is supported by the OS). Directly accessing the custom driver is possible but restricts the new application to your device.

An easier way is too look if you can find a python binding to your mouse driver. Look at the support sites of the device manufacturer.

(That is what the BGE expects)

That is so wrong, gamers got a mouse with at least double amount of buttons :stuck_out_tongue:

An easier way is too look if you can find a python binding to your mouse driver. Look at the support sites of the device manufacturer.

Hmm, then it works for me but not for others.

I can better add a line, at keybindings, telling them to change the mouse key binds in their software/driver them self.
This would be the easiest way i guess.

Thanks for the answers.