Check out example codes for "unity knowing when 0 input is pressed". It will help you in understanding the concepts better.

Code Example 1

if(!Input.anyKey)
{
 Debug.Log("No input is pressed");
}

Learn ReactJs, React Native from akashmittal.com