Skip to content

ctrl+enter prints ;5;13~ #3151

Closed Answered by gpanders
bep asked this question in Q&A
Dec 26, 2024 · 7 comments · 12 replies
Discussion options

You must be logged in to vote

@bep You can make Ctrl+Enter behave the same as enter with

keybind = ctrl+enter=text:\r

Unlike other terminals, Ghostty encodes modified key presses using the CSI u (fixterms) protocol by default. Many applications don't know how to interpret these sequences and so will print them to the console instead (they should probably just be ignoring them, but alas).

In this case, Ctrl+Enter is being encoded using Xterm's "modify other keys" encoding, i.e. CSI 27;5;13~. I am not sure why this isn't using CSIu, but the conclusion is the same in any case.

Replies: 7 comments 12 replies

Comment options

You must be logged in to vote
2 replies
@bep
Comment options

@mitchellh
Comment options

Comment options

You must be logged in to vote
3 replies
@mitchellh
Comment options

@mitchellh
Comment options

@Neutrollized
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@JakeWharton
Comment options

Comment options

You must be logged in to vote
6 replies
@Neutrollized
Comment options

@bep
Comment options

@JakeWharton
Comment options

@gpanders
Comment options

Answer selected by bep
@mitchellh
Comment options

@onetom
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #3149 on December 26, 2024 21:44.