onKeyEvent method
Override this event handler if you want to get notified whenever any key
on a keyboard is pressed, held, or released. The event
will be one of
KeyDownEvent, KeyRepeatEvent, or KeyUpEvent, respectively.
Implementation
void onKeyEvent(KeyEvent event) => _onKeyEvent?.call(event);