diff --git a/web/packages/shared/libs/tdp/client.ts b/web/packages/shared/libs/tdp/client.ts index 9ab52a71a7b8a..ac9d2b370a8c8 100644 --- a/web/packages/shared/libs/tdp/client.ts +++ b/web/packages/shared/libs/tdp/client.ts @@ -187,7 +187,12 @@ export class TdpClient extends EventEmitter { this.sendClientScreenSpec(options.screenSpec); } - if (options.keyboardLayout !== undefined) { + // 0 represents the default keyboard layout from the point of view of the + // remote desktop, so there is no need to send this message. Additionally, + // for clients (Connect) that don't support specifying a keyboard layout + // and WDS versions that don't support this feature (v17 and earlier), this + // avoids the connection crashing. + if (options.keyboardLayout !== undefined && options.keyboardLayout !== 0) { this.sendClientKeyboardLayout(options.keyboardLayout); }