The trigger method is missing the event object and needs to handle getPressedKeyCodes() in this case and isPressed() etc...