Check out example codes for "how to detect f5 key in c#". It will help you in understanding the concepts better.

Code Example 1

private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.F5)
            {
                MessageBox.Show("F5-key pressed");
            }
        }

Learn ReactJs, React Native from akashmittal.com