mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 14:59:02 +08:00
fix: android input, Backspace and Enter (#9782)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
0f5f9f6524
commit
e6c5064ce5
@ -556,13 +556,14 @@ class InputModel {
|
||||
// The correct PhysicalKeyboardKey should be
|
||||
// PhysicalKeyboardKey#e14a9(usbHidUsage: "0x00070028", debugName: "Enter")
|
||||
// https://github.com/flutter/flutter/issues/157771
|
||||
final isKeyMatch =
|
||||
isIOS || isAndroid && e.logicalKey.debugName == e.physicalKey.debugName;
|
||||
// We cannot use the debugName to determine the key is correct or not, because it's null in release mode.
|
||||
// to-do: `isLegacyModeKeys` is not the best workaround, we need to find a better way to fix this issue.
|
||||
final isLegacyModeKeys = ['Backspace', 'Enter'].contains(e.logicalKey.keyLabel);
|
||||
final isMobileAndPeerNotAndroid =
|
||||
isMobile && peerPlatform != kPeerPlatformAndroid;
|
||||
final isDesktopAndMapMode =
|
||||
isDesktop || isWebDesktop && keyboardMode == kKeyMapMode;
|
||||
if (isKeyMatch && (isMobileAndPeerNotAndroid || isDesktopAndMapMode)) {
|
||||
if (!isLegacyModeKeys && (isMobileAndPeerNotAndroid || isDesktopAndMapMode)) {
|
||||
// FIXME: e.character is wrong for dead keys, eg: ^ in de
|
||||
newKeyboardMode(
|
||||
e.character ?? '',
|
||||
|
Loading…
Reference in New Issue
Block a user