diff --git a/flutter/lib/web/bridge.dart b/flutter/lib/web/bridge.dart index d02c45f3ad3..2014f7f2d26 100644 --- a/flutter/lib/web/bridge.dart +++ b/flutter/lib/web/bridge.dart @@ -373,11 +373,7 @@ class RustdeskImpl { bool sessionIsKeyboardModeSupported( {required UuidValue sessionId, required String mode, dynamic hint}) { - if (mainGetInputSource(hint: hint) == 'Input source 1') { - return [kKeyMapMode, kKeyTranslateMode].contains(mode); - } else { - return [kKeyLegacyMode, kKeyMapMode].contains(mode); - } + return [kKeyLegacyMode, kKeyMapMode].contains(mode); } bool sessionIsMultiUiSession({required UuidValue sessionId, dynamic hint}) { @@ -934,13 +930,9 @@ class RustdeskImpl { } String mainGetInputSource({dynamic hint}) { - final inputSource = - js.context.callMethod('getByName', ['option:local', 'input-source']); - // // js grab mode - // export const CONFIG_INPUT_SOURCE_1 = "Input source 1"; - // // flutter grab mode - // export const CONFIG_INPUT_SOURCE_2 = "Input source 2"; - return inputSource != '' ? inputSource : 'Input source 1'; + // Input source 1 (OS-level hooks) is unavailable on web — always use + // Input source 2 (Flutter key events). + return 'Input source 2'; } Future mainSetInputSource( @@ -1737,7 +1729,6 @@ class RustdeskImpl { String mainSupportedInputSource({dynamic hint}) { return jsonEncode([ - ['Input source 1', 'input_source_1_tip'], ['Input source 2', 'input_source_2_tip'] ]); } diff --git a/flutter/web/js/.gitignore b/flutter/web/js/.gitignore index 8737dbba591..0209623d81c 100644 --- a/flutter/web/js/.gitignore +++ b/flutter/web/js/.gitignore @@ -7,3 +7,7 @@ dist-ssr ogvjs .vscode .yarn +mise.toml +src/gen_js_from_hbb.ts +src/message.ts +src/rendezvous.ts