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

@@ -650,6 +650,12 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
}
Widget _buildKeyboard(BuildContext context) {
// Do not support peer 1.1.9.
if (Platform.isMacOS && stateGlobal.grabKeyboard) {
bind.sessionSetKeyboardMode(id: widget.id, value: 'map');
return Offstage();
}
FfiModel ffiModel = Provider.of<FfiModel>(context);
if (ffiModel.permissions['keyboard'] == false) {
return Offstage();