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

Ctrl+m as Enter stopped working #1719

Closed
timka opened this issue Feb 14, 2024 · 1 comment · Fixed by #1720
Closed

Ctrl+m as Enter stopped working #1719

timka opened this issue Feb 14, 2024 · 1 comment · Fixed by #1720

Comments

@timka
Copy link

timka commented Feb 14, 2024

My muscle memory loves using ctrl+m as Enter. I believe this is some old VT100 sequence similar to ctrl+[ functioning as Esc which doesn't work too BTW. However I don't use the later so can't say for sure if this is a regression.

I suspect this may be a result of #1170.

My old version was 11.0.0. Now running 18.0.1.

The old version also wasn't affected by #492

I tried to just revert the binary to 11.0.0 (oh, silly me!) but it didn't work due to DB migrations. Fortunately I had a backup.

@timka timka changed the title ctrl+m as Enter stopped working Ctrl+m as Enter stopped working Feb 14, 2024
@akinomyoga
Copy link
Contributor

I suspect this may be a result of #1170.

#1170 is about the switching between CSI and SS3 in the key codes of up/down/right/left.

The problem of C-m should be related to #1505. In terminals, C-m and RET are usually transmitted by the same code \x0D. The crossterm translates them to KeyCode::Enter [1] and Atuin performs an action for KeyCode::Enter [2]. After #1505, if the terminal supports the kitty keyboard protocol, C-m is transmitted by a distinct key sequence and translated to KeyCode::Char('m') plus KeyModifiers::CONTROL, which isn't processed by Atuin.

akinomyoga added a commit to akinomyoga/atuin that referenced this issue Feb 14, 2024
Fixes atuinsh#1719

[C-m] is usually identical to [RET] in the terminal protocol, and some
users use [C-m] in place of [RET].  However, kitty's extended keyboard
protocol enables differentiating them so that [C-m] does not function
as does without the extended keyboard protocol.

For the compatibility with terminals without extended keyboard
protocols, we anyway cannot assign a distinct feature to [C-m], so we
can safely add the explicit binding of InputAction::Accept to [C-m].
akinomyoga added a commit to akinomyoga/atuin that referenced this issue Feb 14, 2024
Fixes atuinsh#1719

[C-m] is usually identical to [RET] in the terminal protocol, and some
users use [C-m] in place of [RET].  However, kitty's extended keyboard
protocol enables differentiating them so that [C-m] does not function
as does without the extended keyboard protocol.

For the compatibility with terminals without extended keyboard
protocols, we anyway cannot assign a distinct feature to [C-m], so we
can safely add the explicit binding of InputAction::Accept to [C-m].
ellie pushed a commit that referenced this issue Feb 14, 2024
Fixes #1719

[C-m] is usually identical to [RET] in the terminal protocol, and some
users use [C-m] in place of [RET].  However, kitty's extended keyboard
protocol enables differentiating them so that [C-m] does not function
as does without the extended keyboard protocol.

For the compatibility with terminals without extended keyboard
protocols, we anyway cannot assign a distinct feature to [C-m], so we
can safely add the explicit binding of InputAction::Accept to [C-m].
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 a pull request may close this issue.

2 participants