I’m making a game and would like to know how I get a keypress event. All the examples I have seen are using textboxes to register a key handler but I don’t think I need to do that. I just want to get key events for up,down,left,right to move a character.
Share
You can wrap whatever you are using for your display in a FocusPanel.
FocusPanel’s can pick up on keyboard and mouse events. Just add the handlers as needed.