handlingKeyInput property
Set to true to have the UserInterface begin handling keyboard input events and delegating them to its layers based on the current keyBinds. Set to false to cancel all keyboard event handling within this UI.
Note that only the top Layer on the stack will recieve keyboard input events.
Implementation
set handlingKeyInput(bool value) {
if (value == _handlingKeyInput) return;
_handlingKeyInput = value;
if (value) {
_keyDownSubscription = html.document.body!.onKeyDown.listen(_onKeyDown);
_keyUpSubscription = html.document.body!.onKeyUp.listen(_onKeyUp);
} else {
_keyDownSubscription?.cancel();
_keyDownSubscription = null;
_keyUpSubscription?.cancel();
_keyUpSubscription = null;
}
}