2

I want to detect keyboard event and for that I am using RawKeyboardListener/RawKeyboard. This is working when app is focused, but when app is minimised or unfocused RawKeyboard listener isn't working anymore.

As per flutter documentation regarding Background processes I tried isolate and place RawKeyboard listener there but I didn't get expected behaviour.

I have tried below methods of RawKeyboard,

RawKeyboard.instance.keysPressed

and

RawKeyboard.instance.addListener((value) {
   print(value);
});

and also send this value to isolation port but didn't get any luck when app is unfocused or minimised.

Is there any workaround for that?

Hemal Moradiya
  • 1,715
  • 1
  • 6
  • 26

0 Answers0