chore(vendor): import pi 1.3.0

Imported as a linear vendor commit so forge rebases do not replay the upstream root tree.

git-subtree-dir: third_party/pi

git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
This commit is contained in:
alexion committed 2026-10-15 17:58:48 -04:00
1 parent 719370c8f7
commit 6081e3e325
1743 files changed
+205459 -131704

No files matched your search

+14
View File
@@ -134,6 +134,16 @@ describe("matchesKey", () => {
setKittyProtocolActive(false);
});
it("should match shifted symbols by their produced character", () => {
setKittyProtocolActive(true);
assert.strictEqual(matchesKey("\x1b[61:43;2u", "+"), true);
assert.strictEqual(matchesKey("\x1b[61:43;2u", "shift+="), true);
assert.strictEqual(parseKey("\x1b[61:43;2u"), "+");
assert.strictEqual(matchesKey("\x1b[61:43;6u", "ctrl++"), true);
assert.strictEqual(parseKey("\x1b[61:43;6u"), "ctrl++");
setKittyProtocolActive(false);
});
it("should handle shifted key in format", () => {
setKittyProtocolActive(true);
// Format with shifted key: CSI codepoint:shifted:base;modifier u
@@ -265,6 +275,8 @@ describe("matchesKey", () => {
setKittyProtocolActive(false);
assert.strictEqual(matchesKey("\x1b[27;5;47~", "ctrl+/"), true);
assert.strictEqual(parseKey("\x1b[27;5;47~"), "ctrl+/");
assert.strictEqual(matchesKey("\x1b[27;6;43~", "ctrl++"), true);
assert.strictEqual(parseKey("\x1b[27;6;43~"), "ctrl++");
});
it("should match xterm modifyOtherKeys digit combos", () => {
@@ -600,6 +612,8 @@ describe("parseKey", () => {
assert.strictEqual(parseKey(" "), "space");
assert.strictEqual(parseKey("1"), "1");
assert.strictEqual(matchesKey("1", "1"), true);
assert.strictEqual(parseKey("+"), "+");
assert.strictEqual(matchesKey("+", "+"), true);
});
it("should parse arrow keys", () => {