diff options
| author | Shoubhit Dash <[email protected]> | 2026-03-25 15:54:55 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-25 05:24:55 -0500 |
| commit | d1c49ba210315900b7d21a7d4926b739d8021c6e (patch) | |
| tree | 626207d26b6c338136b069bbaaa09d67a45ddde3 /packages/app/src/context/command-keybind.test.ts | |
| parent | 3ea72aec21e6266a69cda23b5705c6e8e7e19186 (diff) | |
| download | opencode-d1c49ba210315900b7d21a7d4926b739d8021c6e.tar.gz opencode-d1c49ba210315900b7d21a7d4926b739d8021c6e.zip | |
fix(app): move message navigation off cmd+arrow (#18728)
Diffstat (limited to 'packages/app/src/context/command-keybind.test.ts')
| -rw-r--r-- | packages/app/src/context/command-keybind.test.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/app/src/context/command-keybind.test.ts b/packages/app/src/context/command-keybind.test.ts index d804195c4..c8e2dbb5d 100644 --- a/packages/app/src/context/command-keybind.test.ts +++ b/packages/app/src/context/command-keybind.test.ts @@ -32,6 +32,25 @@ describe("command keybind helpers", () => { expect(matchKeybind(keybinds, new KeyboardEvent("keydown", { key: ",", ctrlKey: true, altKey: true }))).toBe(false) }) + test("matchKeybind supports bracket keys", () => { + const keybinds = parseKeybind("mod+alt+[, mod+alt+]") + const prev = keybinds[0] + const next = keybinds[1] + + expect( + matchKeybind( + keybinds, + new KeyboardEvent("keydown", { key: "[", ctrlKey: prev?.ctrl, metaKey: prev?.meta, altKey: true }), + ), + ).toBe(true) + expect( + matchKeybind( + keybinds, + new KeyboardEvent("keydown", { key: "]", ctrlKey: next?.ctrl, metaKey: next?.meta, altKey: true }), + ), + ).toBe(true) + }) + test("formatKeybind returns human readable output", () => { const display = formatKeybind("ctrl+alt+arrowup") |
