Mouse Configuration

I am trying to allow the user to choose either a mouse button for their configuration or a key, but I’m not sure how to do that.

Here is the code block that allows the key press and it works fine:

if(_getKey) {
			
	if(Input.anyKeyDown) {
				
	    if(Event.current.type == EventType.KeyDown) {

		    if(Event.current.keyCode != KeyCode.None ) {
						
			    KeyCode kc = Event.current.keyCode;
			    _inputControls.forward = kc;
						
			    _getKey = false;
            }
		}
	}
}

But how do I allow them to click a mouse button?

In C# it’s Input.GetMouseButtonDown(0) for left Mousebutton and Input.GetMouseButtonDown(1) for right Mousebutton.

See the description here:

Flo

Or in Event terms Event.current.button == 0 is left mouse, 1 is right mouse, etc
And its a EventType.MouseDown event, rather than a KeyDown

Thanks!