Input.GetKey(Keycode.Mouse0) (Possible Dumb question)

I’ve noticed in the keycode enum type there is multiple “mouse” which seem not to have any effects, now I don’t know if that is a bug, but if it isn’t how can i make them work? can any one clarify this?

Ps. I do know about Input.GetMouse(int); which i am using, but i found it a little odd the keycode had those mouse enumerations in it.

They work as described in the docs; namely Mouse0 is the primary mouse button, Mouse1 is the secondary button, etc. That’s really all there is to it…obviously they aren’t “keys” in the sense of being on the keyboard, but they act like keys (they are either pressed or not).

–Eric

Aaah, I see but then, how come it doesn’t show up when using “Event.current.keyCode”? Only thing it says is “none”.

Okay, I’ve fixed it, silly error actually, the system for taking key-presses works on every event, but getting the current event is apparently split up in button and key events, which at first was a little confusing, but solved the problem now :slight_smile: