leanflutter/hotkey_manager

[Windows] keyUpHandler is not being invoked

jakub-stefaniak opened this issue · 3 comments

In example project we have 2 handlers:

 void _keyDownHandler(HotKey hotKey) {
   String log = 'keyDown ${describeEnum(hotKey.keyCode)} (${hotKey.scope})';
   BotToast.showText(text: log);
   print(log);
 }

 void _keyUpHandler(HotKey hotKey) {
   String log = 'keyUp   ${describeEnum(hotKey.keyCode)} (${hotKey.scope})';
   print(log);
 }

keyDownHandler is being called properly, but keyUpHandler not. It can be easily observed because _keyUpHandler should print log but it doesn't do that.

I've tested this in my project as well and unfortunately it wasn't working on windows devices. Everything works fine on macOS, but keyUpHandler(_:) is no't triggered on windows. Any chances to make a fix for that issue?

Plugin version: hotkey_manager: ^0.1.7
Flutter: 3.3.3

It looks like there is no implementation for onKeyUp method on Windows and Linux

It looks like there is no implementation for onKeyUp method on Windows and Linux

Yes, only macOS supports the onKeyUp event, as noted in README.md .