work around Safari sending keycode 13 (enter) when typing ctrl-c on iphone, iPad, AppleVisionPro

This commit is contained in:
Serge
2026-03-09 13:42:36 +09:00
committed by Daniel Imms
parent 413c87cbf9
commit f155c65e5a
+6 -1
View File
@@ -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: