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

fix: treat CTRL + J as Enter #832

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ErichDonGubler
Copy link

@ErichDonGubler ErichDonGubler commented Sep 24, 2024

This resolves the issue I noted having in nushell/nushell#6427 (comment), where hitting Enter in MacOS and Linux outside the main Reedline::read_line call in raw mode results in a CTRL + J event that yields no actual input once read_line is called again.

I'm not positive that this doesn't introduce regressions with, e.g., pasted input. I'm not sure what the best way to test this would be.

I'm also not sure if it resolves that issue in its entirety, since the question of whether its scope should include \n is unresolved.

@sholderbach
Copy link
Member

I don't think hardcoding the binding like this is the right move, even if I can see it being part of the default binding. If you use the kitty keyboard extensions it may be possible to bind the true Ctrl-j then you probably want the ability to rewire it.

@ErichDonGubler
Copy link
Author

I use Wezterm, so maybe there's some configuration I need to investigate there. I'm not currently aware of a way to rebind keys like that in Wezterm, but admittedly I haven't looked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants