Using C#, how do I get a keyboard input from user that is not an escape key? Rhino student needs help!

I’m not too familiar with the event functions in C#, so I’m looking for a an example of a short, effective script that can allow the user to press any key (like the space key, for example) at any given time. Is it a different method than that of pressing the escape key?

http://discourse.mcneel.com/t/using-c-how-do-i-enable-the-user-press-the-escape-button-to-stop-a-process-from-happening-rhino-student-needs-help/30003

I didn’t get examples from that topic, I’ve tried to figure it out myself
but it didn’t work.

The example is in the last post of the other topic.

I apologize, I realized that even though the links in the last response
contained escape keys, the first link was done differently. My mistake
thanks for your patience.

I tried the first link in my program, but nothing happened when I pressed
the escape key.

Also, both examples used RhinoApp.EscapeKeyPressed. What do I use if I want
to use other keys like space and the arrow keys?

I apologize, I realized that even though the links in the last response
contained escape keys, the first link was done differently. My mistake
thanks for your patience.

I tried the first link in my program, but nothing happened when I pressed
the escape key.

Also, both examples used RhinoApp.EscapeKeyPressed. What do I use if I want
to use other keys like space and the arrow keys?