From f155c65e5aca2f3762d20d7e58ce463e1845ddfd Mon Sep 17 00:00:00 2001 From: Serge Date: Thu, 19 Feb 2026 12:12:57 +0100 Subject: [PATCH] work around Safari sending keycode 13 (enter) when typing ctrl-c on iphone, iPad, AppleVisionPro --- src/common/input/Keyboard.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/input/Keyboard.ts b/src/common/input/Keyboard.ts index 320854677..79a0ed07c 100644 --- a/src/common/input/Keyboard.ts +++ b/src/common/input/Keyboard.ts @@ -99,7 +99,12 @@ export function evaluateKeyboardEvent( break; case 13: // return/enter - result.key = ev.altKey ? C0.ESC + C0.CR : C0.CR; + if (ev.key == 'c' && ev.ctrlKey) { + // Safari on iPad, iOS, AppleVisionPro sends key 13 when typing ctrl-c on hardware keyboard + result.key = C0.ETX; + } else { + result.key = ev.altKey ? C0.ESC + C0.CR : C0.CR; + } result.cancel = true; break; case 27: