-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
C-[ not recognized on Windows #677
Comments
Not sure if it helps narrow down what's going on, but "A-[" maps via config.toml. It seems "C-]" and "C-." aren't recognized either, but "C-c" is. Something about Ctrl plus non-alphanumeric characters? Edit: neovim responds as expected to "C-[", so it should be possible. I'll try to figure out where Helix is handling keyboard input. |
Trying to investigate on it, and find that it's the issue in crossterm |
Have open a PR for this scenario crossterm-rs/crossterm#619 Let's see how it goes... Hope that implementation is ok :-) |
Your patch worked on my system to get crossterm to recognize the offending sequences. If the crossterm maintainers don't accept it, is there a way it can be applied at the helix level? It seems like it would be a shame to have to maintain a forked crossterm. |
Glad that works :-)
Sadly I don't think so, because the relative parse function is private, and it's hard to adjust outside crossterm.
Agree with that, what if we just modify our crossterm = { version = "0.22", features = ["event-stream"], git = "https://github.com/WindSoilder/crossterm" } And we can revert it back as soon as that original issue is solved. Here is the reference: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories |
Seeing the mention of a switch to termwiz in #1472, is there any chance termwiz handles this? It seems like crossterm isn't accepting PRs very quickly. |
It looks like @WindSoilder 's PR has landed in Crossterm 0.23! |
Reproduction steps
On Windows 10 in both Powershell and CMD, C-[ does not match the behavior of Esc as it does on Linux. This was discovered during the conversation in #661. Explicitly mapping it as in the following
config.toml
does not seem to be recognized either:The theme is set to verify that
config.toml
is being successfully loaded. While my understanding is that the mechanism for the behavior of C-[ and Esc matching on Linux is a property of the terminal, it would be nice to match out-of-the-box for multiplatform support, or at least allow the explicit mapping.Environment
helix 0.4.1
The
helix.log
file is blank.The text was updated successfully, but these errors were encountered: