public final KeyCode getCode ()

The key code associated with the key in this key pressed or key released event. For key typed events, code is always KeyCode.UNDEFINED.

Returns:  The key code associated with the key in this event, KeyCode.UNDEFINED for key typed event