I want to use the 'escape' key in Flutter web to change the widget. The issue that I have is, when in fullscreen my RawKeyboardListener doesn't detect the escape key pressed, unlike when not in fullscreen. I was wondering how to rectify this:
Here is my fullscreen function:
void goFullScreen() {
document.documentElement!.requestFullscreen();
}
Here is my RawKeyboardListener:
RawKeyboardListener(
autofocus: true,
focusNode: FocusNode(),
onKey: (event){
if (event.isKeyPressed(LogicalKeyboardKey.exit)) {
print('escape pressed');
}
},