Detect the controller and the keystrokes