Keyboard Control HOWTO

Hi, welcome to the forums!

Take a look at this thread, this should cover your question:
[How do you detect keyboard input in C++?)

You can find more results when you search the forums for define_key.