Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key mapping for "Alt+[" not working #5447

Closed
gariel opened this issue Jan 8, 2023 · 2 comments · Fixed by #4939
Closed

Key mapping for "Alt+[" not working #5447

gariel opened this issue Jan 8, 2023 · 2 comments · Fixed by #4939
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug

Comments

@gariel
Copy link

gariel commented Jan 8, 2023

Summary

Hi guys, thankyou for you amazing project

I'm trying to define some keymaps for navigating through buffers, but I'm having one issue with the "A-[" mapping

Reproduction Steps

I'm using the following configuration:

[keys.normal]
"A-[" = "goto_previous_buffer"
"A-]" = "goto_next_buffer"

The "A-]" for going to the next buffer works as expected, but the "A-[" seems not mapped (pressing it twice opens the "[" menu)

Helix log

I delete the log file for cleaning up before sending, opened the helix and used the keybindings to generate something but the file was empty

Here is my complete helix.toml:

theme = "dracula_at_night"

[editor]
line-number = "relative"
mouse = true
true-color = true
bufferline = "always"
color-modes = true

[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"

[editor.file-picker]
hidden = false

[editor.statusline]
left = ["mode", "spinner"]
center = ["file-name"]

[editor.indent-guides]
render = true
character = ""
skip-levels = 1

[keys.normal]
C-s = ":w"
C-S-up = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"]
C-S-down = ["extend_to_line_bounds", "delete_selection", "paste_after"]
A-pageup = "goto_previous_buffer"
A-pagedown = "goto_next_buffer"
C-n = ":new"
C-w = ":buffer-close"
C-S-w = ":buffer-close!"
"A-[" = "goto_previous_buffer"
"A-]" = "goto_next_buffer"
"[" = { "[" = "goto_previous_buffer" }
"]" = { "]" = "goto_next_buffer" }

[keys.select]
C-S-up = ["extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"]
C-S-down = ["extend_to_line_bounds", "delete_selection", "paste_after"]
A-pageup = "goto_previous_buffer"
A-pagedown = "goto_next_buffer"
C-s = ["normal_mode", ":w"]

[keys.insert]
C-s = ["normal_mode", ":w"]
C-space = "completion"
C-S-k = "hover"
C-S-up = ["normal_mode", "extend_to_line_bounds", "delete_selection", "move_line_up", "paste_before"]
C-S-down = ["normal_mode", "extend_to_line_bounds", "delete_selection", "paste_after"]
A-pageup = "goto_previous_buffer"
A-pagedown = "goto_next_buffer"

Platform

Linux

Terminal Emulator

Alacritty and gnome-terminal

Helix Version

helix 22.12

@gariel gariel added the C-bug Category: This is a bug label Jan 8, 2023
@gariel gariel changed the title Mapping for "Alt+[" not working Key mapping for "Alt+[" not working Jan 8, 2023
@the-mikedavis
Copy link
Member

I'm pretty sure this is the same problem as #1085 - the terminal keycodes for A-[ are confused with something else (escape if I remember correctly?). This will be fixed by #4939

@the-mikedavis the-mikedavis linked a pull request Jan 11, 2023 that will close this issue
@the-mikedavis the-mikedavis added the A-helix-term Area: Helix term improvements label Jan 11, 2023
@kendfss
Copy link

kendfss commented Jan 14, 2023

#4939 would also allow usage of C-/, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants