listen flutter key event when there's no input monitor permission

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-02-21 18:43:43 +08:00
parent 6157889bb0
commit 9dbd1f88f5
7 changed files with 25 additions and 13 deletions

View File

@@ -58,6 +58,10 @@ class InputModel {
InputModel(this.parent);
KeyEventResult handleRawKeyEvent(FocusNode data, RawKeyEvent e) {
if (!stateGlobal.grabKeyboard) {
return KeyEventResult.handled;
}
// * Currently mobile does not enable map mode
if (isDesktop) {
bind.sessionGetKeyboardMode(id: id).then((result) {