work around Safari sending keycode 13 (enter) when typing ctrl-c on iphone, iPad, AppleVisionPro
This commit is contained in:
@@ -99,7 +99,12 @@ export function evaluateKeyboardEvent(
|
|||||||
break;
|
break;
|
||||||
case 13:
|
case 13:
|
||||||
// return/enter
|
// 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;
|
result.cancel = true;
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27:
|
||||||
|
|||||||
Reference in New Issue
Block a user