Check out example codes for "unity up arrow input". It will help you in understanding the concepts better.

Code Example 1

Input.GetKeyDown("up")

Learn ReactJs, React Native from akashmittal.com