From f155c65e5aca2f3762d20d7e58ce463e1845ddfd Mon Sep 17 00:00:00 2001 From: Serge Date: Thu, 19 Feb 2026 12:12:57 +0100 Subject: [PATCH 1/2] 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: From 87bf81cf96fc86de6c6ef77ae49b8a376f524c94 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Mon, 9 Mar 2026 13:44:02 +0900 Subject: [PATCH 2/2] Call out hack, fix lint --- src/common/input/Keyboard.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/input/Keyboard.ts b/src/common/input/Keyboard.ts index 79a0ed07c..545b436c8 100644 --- a/src/common/input/Keyboard.ts +++ b/src/common/input/Keyboard.ts @@ -99,8 +99,9 @@ export function evaluateKeyboardEvent( break; case 13: // return/enter - if (ev.key == 'c' && ev.ctrlKey) { - // Safari on iPad, iOS, AppleVisionPro sends key 13 when typing ctrl-c on hardware keyboard + if (ev.key === 'c' && ev.ctrlKey) { + // HACK: 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;