- Home /
Get axis literal keyboard or mouse value... not possible?
Hi all,
I have a dire need: I need to know which key or mouse button is actually associated with an axis.
Quite simply, we all can get into input manager and define a new axis, for example 'myaxisname' with a positive button of mouse1, and then we can use
Input.GetAxis("myaxisname")
to check if the axis is in use or not, but how about the actual button/ key associated with said axis? I haven't been able to find any reference to it. It's quite certain that despite my multiple reads of the guide, I haven't been able to 'extract' mouse1 from Input.GetAxis("myaxisname")
What I'm trying to achieve is basically
GUILayout.Label("Press " + whats_the_button_of("myaxisname") + " to use");
Your answer
Follow this Question
Related Questions
How to script "GetAxisUp"? 2 Answers
horizontal menu + gamepad 1 Answer
Scale gameObject 1 Answer
How do I get a value from Input.GetAxis() ? 1 Answer
Input.getaxis (and getaxisraw) not returning the correct values with my joysticks 0 Answers