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

Mapping C-[ and C-] fails #5129

Closed
augustebaum opened this issue Dec 12, 2022 · 1 comment
Closed

Mapping C-[ and C-] fails #5129

augustebaum opened this issue Dec 12, 2022 · 1 comment
Labels
C-bug Category: This is a bug

Comments

@augustebaum
Copy link

Summary

I wanted a quick way to switch buffers so I added this to my config, in the [keys.normal] section:

"C-[" = ":buffer-previous"
"C-]" = ":buffer-next"

The buffer does not switch, instead of C-[ helix saves the current buffer, and on C-] nothing happens. I tried A-[/] as well and A-] works, but not the other (triggers the [ menu instead).
Has anyone run into this before or would otherwise know how to debug this?

I tried visualising the keypresses using Karabiner-EventViewer and everything seems normal.

Reproduction Steps

No response

Helix log

~/.cache/helix/helix.log
2022-12-12T10:56:01.292 helix_loader [DEBUG] Located configuration folders: []
2022-12-12T10:56:01.311 helix_view::clipboard [DEBUG] Using pbcopy+pbpaste to interact with the system clipboard
2022-12-12T10:56:01.342 helix_view::editor [ERROR] Failed to initialize the LSP for `source.md` { cannot find binary path }
2022-12-12T10:56:01.342 helix_view::editor [DEBUG] editor status: Loaded 1 files.
2022-12-12T10:56:01.342 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
2022-12-12T10:56:01.342 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
2022-12-12T10:56:01.342 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE
2022-12-12T10:56:01.343 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE
2022-12-12T10:56:01.343 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:01.714 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-12T10:56:03.815 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:04.038 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:04.118 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:04.199 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:04.216 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-12T10:56:04.304 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:04.566 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:06.209 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:06.287 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:06.314 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:06.391 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:06.407 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:06.874 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:07.162 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:07.216 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:07.610 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:07.672 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:07.996 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:10.432 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:10.488 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:10.607 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:10.711 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:11.844 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:12.265 helix_view::editor [ERROR] Failed to initialize the LSP for `source.md` { cannot find binary path }
2022-12-12T10:56:12.265 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:12.265 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:12.266 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:12.266 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:13.719 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:13.719 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:13.719 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:13.720 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:13.998 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:13.998 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:13.999 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:13.999 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:14.157 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:14.158 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:14.158 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:14.158 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:14.317 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:14.318 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:14.318 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:14.318 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:14.453 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:14.454 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:14.454 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:14.454 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:14.856 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-12T10:56:15.047 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:15.047 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:15.047 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:15.422 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:15.422 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:15.422 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:15.823 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-12T10:56:15.871 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:15.871 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:15.872 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:16.272 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-12T10:56:17.836 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:17.836 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:17.836 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:18.238 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-12T10:56:18.951 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:18.951 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:18.951 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:19.353 helix_term::application [DEBUG] received editor event: IdleTimer
2022-12-12T10:56:20.151 helix_term::commands::typed [DEBUG] quitting...
2022-12-12T10:56:20.152 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:20.152 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:20.152 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:20.383 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:20.383 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:20.383 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:20.525 helix_term::job [DEBUG] waiting on jobs...
2022-12-12T10:56:20.525 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2022-12-12T10:56:20.526 helix_view::document [DEBUG] id 2 modified - last saved: 0, current: 0
2022-12-12T10:56:20.526 helix_term::job [DEBUG] waiting on jobs...
2022-12-12T10:56:20.528 mio::poll [TRACE] deregistering event source from poller
2022-12-12T10:56:20.528 mio::poll [TRACE] deregistering event source from poller
I opened an `md` file, opened another with `:open`, then run `A-]` a few times (which worked as intended), then `A-[` a few times (which failed), then quit. I don't think there is much to be found here...

Platform

macOS

Terminal Emulator

wezterm 20221119-145034-49b9839f

Helix Version

helix 22.12 (96ff64a)

@augustebaum augustebaum added the C-bug Category: This is a bug label Dec 12, 2022
@the-mikedavis
Copy link
Member

These keys are another instance of #1085: the keycodes that the terminal gives are confused with other inputs. For example C-[ is interpreted as Escape and C-] as C-5. I'll close in favor of #1085.

These are all interpreted correctly with #4939

@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants