mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Refactor: map keyboard
This commit is contained in:
@@ -291,13 +291,13 @@ class _RemotePageState extends State<RemotePage>
|
||||
keyCode = -1;
|
||||
}
|
||||
|
||||
if (e is RawKeyDownEvent){
|
||||
if (e is RawKeyDownEvent) {
|
||||
down = true;
|
||||
}else{
|
||||
} else {
|
||||
down = false;
|
||||
}
|
||||
|
||||
_ffi.inputRawKey(keyCode, scanCode, down);
|
||||
|
||||
_ffi.inputRawKey(e.character ?? "", keyCode, scanCode, down);
|
||||
}
|
||||
|
||||
void legacyKeyboardMode(RawKeyEvent e) {
|
||||
|
||||
@@ -993,10 +993,14 @@ class FFI {
|
||||
msg: json.encode(modify({'type': type, 'buttons': button.value})));
|
||||
}
|
||||
|
||||
// Raw Key
|
||||
void inputRawKey(int keyCode, int scanCode, bool down){
|
||||
debugPrint(scanCode.toString());
|
||||
// bind.sessionInputRawKey(id: id, keycode: keyCode, scancode: scanCode, down: down);
|
||||
// Raw Key
|
||||
void inputRawKey(String name, int keyCode, int scanCode, bool down) {
|
||||
bind.sessionHandleFlutterKeyEvent(
|
||||
id: id,
|
||||
name: name,
|
||||
keycode: keyCode,
|
||||
scancode: scanCode,
|
||||
downOrUp: down);
|
||||
}
|
||||
|
||||
/// Send key stroke event.
|
||||
|
||||
Reference in New Issue
Block a user