@zem-sh/terminal 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zem-sh/terminal",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Terminal emulator core — the Ghostty VT engine compiled to WebAssembly, GPU text rendering, ligature shaping, themes and font fallback",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -143,6 +143,19 @@ function encodeKittySequence(
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
export function encodeKittyKeyEvent(event: KeyboardEvent, kittyFlags: number): string {
|
|
146
|
+
// Preserve the conventional terminal interrupt byte even when an app has
|
|
147
|
+
// enabled Kitty keyboard reporting. Older TTY programs may echo CSI-u input.
|
|
148
|
+
if (
|
|
149
|
+
event.type === "keydown" &&
|
|
150
|
+
event.ctrlKey &&
|
|
151
|
+
!event.shiftKey &&
|
|
152
|
+
!event.altKey &&
|
|
153
|
+
!event.metaKey &&
|
|
154
|
+
event.key?.toLowerCase() === "c"
|
|
155
|
+
) {
|
|
156
|
+
return "\x03";
|
|
157
|
+
}
|
|
158
|
+
|
|
146
159
|
const reportEvents = (kittyFlags & KITTY_FLAG_REPORT_EVENTS) !== 0;
|
|
147
160
|
const reportAlternate = (kittyFlags & KITTY_FLAG_REPORT_ALTERNATE) !== 0;
|
|
148
161
|
const reportAll = (kittyFlags & KITTY_FLAG_REPORT_ALL) !== 0;
|