Check out example codes for "unity imput w". It will help you in understanding the concepts better.

Code Example 1

if (Input.GetKeyDown(KeyCode.Space))
        {
            print("space key was pressed");
        }

Code Example 2

//hi I'm gonna make the best video game ever!

Code Example 3

Input.GetKey(KeyCode.Space))

Learn ReactJs, React Native from akashmittal.com