Merge pull request #964 from asur4s/master

Feat: Support new keyboard mode
This commit is contained in:
RustDesk
2022-09-07 21:34:29 +08:00
committed by GitHub
74 changed files with 1864 additions and 1493 deletions

View File

@@ -972,6 +972,28 @@ class FFI {
msg: json.encode(modify({'type': type, 'buttons': button.value})));
}
// Raw Key
void inputRawKey(String name, int keyCode, int scanCode, bool down) {
bind.sessionHandleFlutterKeyEvent(
id: id,
name: name,
keycode: keyCode,
scancode: scanCode,
downOrUp: down);
}
Future<String> getKeyboardMode() {
return bind.sessionGetKeyboardName(id: id);
}
void enterOrLeave(bool enter) {
// Fix status
if (!enter) {
resetModifiers();
}
bind.sessionEnterOrLeave(id: id, enter: enter);
}
/// Send key stroke event.
/// [down] indicates the key's state(down or up).
/// [press] indicates a click event(down and up).