feat(keymap): bind Ctrl+Alt+click to Go to Implementation on Windows and Linux (#469)

The Windows/Linux keymap only bound the Ctrl+Alt+B stroke to navigate.implementation, so the click gesture that #405 made remappable did nothing there. Adds Ctrl+Alt+Button1 alongside the existing macOS Meta+Alt+Button1 binding; other Alt-click gestures are unaffected because column mode and multi-caret need different modifiers.

Closes #365

Co-authored-by: a-rookie-of-C-language <[email protected]>
Цей коміт міститься в:
arookieofcтаa-rookie-of-C-language authored and GitHub committed 2026-10-30 22:51:49 +08:00
1 джерело 81fe384f4f
коміт 091c25351b
3 files changed
+10 -2

No files matched your search

+8
Переглянути файл
@@ -115,6 +115,14 @@ describe("mouse navigation", () => {
expect(openFile).not.toHaveBeenCalled();
});
it.each(["windows", "linux"] as const)("opens the implementation with Ctrl+Alt+click on %s", async (os) => {
usePlatform.setState({ os });
useKeymap.setState({ preset: "intellij-windows", overrides: {} });
click({ ctrlKey: true, altKey: true });
await vi.waitFor(() => expect(openFile).toHaveBeenCalledOnce());
expect(lspGoto).toHaveBeenCalledExactlyOnceWith(1, { line: 0, col: 9 }, "implementation");
});
it("does not navigate with Option+Command when the binding is removed", async () => {
useKeymap.setState({ overrides: { "navigate.implementation": ["Meta+Alt+B"] } });
click({ metaKey: true, altKey: true });
+1 -1
Переглянути файл
@@ -36,7 +36,7 @@ describe("IDEA keymap parity", () => {
["window.previous", ["Meta+Alt+Shift+`"], ["Ctrl+Alt+["]],
["code.commentBlock", ["Meta+Alt+/", "Ctrl+Shift+/"], ["Ctrl+Shift+/"]],
["navigate.typeDeclaration", ["Meta+Shift+B", "Ctrl+Shift+B"], ["Ctrl+Shift+B"]],
["navigate.implementation", ["Meta+Alt+B", "Meta+Alt+Button1"], ["Ctrl+Alt+B"]],
["navigate.implementation", ["Meta+Alt+B", "Meta+Alt+Button1"], ["Ctrl+Alt+B", "Ctrl+Alt+Button1"]],
["find.next", ["Meta+G"], ["F3", "Ctrl+L"]],
["find.previous", ["Meta+Shift+G"], ["Shift+F3", "Ctrl+Shift+L"]],
["project.copy", ["Meta+C"], ["Ctrl+C", "Ctrl+Insert"]],
+1 -1
Переглянути файл
@@ -20,7 +20,7 @@ export const intellijWindows: Record<string, string[]> = {
"navigate.forward": ["Ctrl+Alt+Right", "Button5"],
"navigate.gotoLine": ["Ctrl+G"],
"navigate.declaration": ["Ctrl+B"],
"navigate.implementation": ["Ctrl+Alt+B"],
"navigate.implementation": ["Ctrl+Alt+B", "Ctrl+Alt+Button1"],
"navigate.typeDeclaration": ["Ctrl+Shift+B"],
"navigate.fileStructure": ["Ctrl+F12"],
"navigate.nextError": ["F2"],