I see you've written your own control class. Are you aware that JEDI-SDL ships with it's own SDL Input Manager that should handle Keyboard, Mouse and Joysticks. Have a look at sdlinput.pas. It may save you some time.