Skip to content

Commit 517aa6c

Browse files
committed
fix(keymaps/linux)!: use <A-l> instead of <C-l> for navigating history
<C-l> conflicts with a default firefox keymap to focus the address bar, <A-l> should be a safer default. this also changes <C-h> for consistency. closes #19
1 parent 8233672 commit 517aa6c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/glide/browser/base/content/plugins/keymaps.mts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ export function init(sandbox: Sandbox) {
2828
glide.keymaps.set("ignore", "<S-Esc>", "mode_change normal");
2929

3030
// history
31-
glide.keymaps.set(["normal", "insert"], "<C-h>", "back");
32-
glide.keymaps.set(["normal", "insert"], "<C-l>", "forward");
31+
if (glide.ctx.os === "macosx") {
32+
glide.keymaps.set(["normal", "insert"], "<C-h>", "back");
33+
glide.keymaps.set(["normal", "insert"], "<C-l>", "forward");
34+
} else {
35+
// we don't use <C-l> on linux as it would conflict with a builtin keymap
36+
glide.keymaps.set(["normal", "insert"], "<A-h>", "back");
37+
glide.keymaps.set(["normal", "insert"], "<A-l>", "forward");
38+
}
3339

3440
// hint mode
3541
glide.keymaps.set("normal", "f", "hint");

0 commit comments

Comments
 (0)