- Home /
Question by
erenaydin · Jul 27, 2011 at 10:21 AM ·
inputcontrollerkey
Controller menu keylist
I want to show keys list in options menu. But i don't know how can i reach the keyname of Input.GetButton("Run")
Comment
Best Answer
Answer by Joshua · Jul 27, 2011 at 12:24 PM
Use KeyCode, an enum of all the different keys.
var jumpKey : KeyCode = KeyCode.Space;
function Update( )
{
if( input.GetKeyDown( jumpKey ) )
Jump( );
}
Your answer
![](https://koobas.hobune.stream/wayback/20220612160132im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Check the latest key pressed? 2 Answers
How to get the key from the button name 1 Answer
Key remapping inGame 0 Answers
Add different input for On Click event (UI) 0 Answers
Problems with joystick / controller axes being 1/-1 "way too often" 1 Answer