Check out example codes for "use enter key unity". It will help you in understanding the concepts better.

Code Example 1

if (Input.GetKey(KeyCode.Return))

Learn ReactJs, React Native from akashmittal.com