You don't write code in an event. Like many, I think that you're confusing an event and an event handler. Consider a Button in a form. You create a handler for the Button's Click event in the form. The event handler is a method and it's a member of the form. The Button raises its Click event and the form's method, i.e. the event handler, is executed. Any work you want done when the Button is clicked goes in that event handler. If you want to call another method then do so. If you want to get or set a property then do so. If you want to perform a calculation then do so.
For example if I was calculating something that needed to update every time Enter or Tab was pressed in one of the fields that controlled the calculation. Can I setup a method and call it like This.CalculateET();
If you want to do something when a keyboard key is pressed then you would handle the PreviewKeyDown, KeyDown, KeyPress or KeyUp event of the appropriate control. Which event you choose depends on the specifics. KeyPress relates to characters while the others relate to keyboard keys. I'll let you read about the others to determine the differences.
If you want to do the same thing for keys or characters regardless of which control has focus then you can handle the event of the form instead of individual controls. Just be sure to set the form's KeyPreview property to true.
Next Question, is C# what I should be learning if I will be porting my racing software to PCs, Tablets, and Phones?
For future reference, please start a new thread for a question on a new topic. One thread per topic and one topic per thread. Now that your question is here though, the answer that C# is a good choice for that. It can be used to write web applications, Windows applications and apps for Windows 10, Windows 10 Mobile and also Android and iOS.