Files
sirmalloc--ccstatusline/patches/ink@6.2.0.patch
T
2026-07-13 12:49:29 +08:00

18 lines
893 B
Diff

diff --git a/build/parse-keypress.js b/build/parse-keypress.js
index 1e13e819f59d259a3476510db822695576a9d93c..e100611d8661187c4ca191e89621cd5e480fcacc 100644
--- a/build/parse-keypress.js
+++ b/build/parse-keypress.js
@@ -161,9 +161,9 @@ const parseKeypress = (s = '') => {
key.meta = s.charAt(0) === '\x1b';
}
else if (s === '\x7f' || s === '\x1b\x7f') {
- // TODO(vadimdemedes): `enquirer` detects delete key as backspace, but I had to split them up to avoid breaking changes in Ink. Merge them back together in the next major version.
- // delete
- key.name = 'delete';
+ // On macOS, \x7f is what the backspace key sends, not delete
+ // The actual forward delete sends escape sequences like \x1b[3~
+ key.name = 'backspace';
key.meta = s.charAt(0) === '\x1b';
}
else if (s === '\x1b' || s === '\x1b\x1b') {