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

Add workarounds for foot terminal #3861

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

Conversation

danofsteel32
Copy link

See https://codeberg.org/dnkl/foot/issues/628 for why foot terminal handles Shift+Enter and Control+Enter differently than other terminals.

Without these 2 fixes pressing Shift+Enter/Control+Enter in a TextArea causes the whole App to hang for ~10 seconds before inserting the raw escape sequence.

With these 2 fixes Shift+Enter/Control+Enter insert a carriage return.

See https://codeberg.org/dnkl/foot/issues/628 for why foot terminal handles Shift+Enter and Control+Enter differently than other terminals.

Without these 2 fixes pressing Shift+Enter/Control+Enter in a TextArea causes the whole App to hang for ~10 seconds before inserting the raw escape sequence.

With these 2 fixes Shift+Enter/Control+Enter insert a carriage return.
@rodrigogiraoserrao
Copy link
Contributor

Hey Daniel, thanks for the PR and the extra context.
Right now, Dave is doing some work on escape sequences in #3800.

I don't understand a lot about control sequences so I need your help to understand this: if these 2 control sequences do not get added specifically for foot and instead they're handled by the general system in #3800 for unknown sequences, what would happen if you hit Ctrl + Enter / Shift + Enter inside a TextArea?

@danofsteel32
Copy link
Author

I dug into this a bit more and I was able to find a workaround in foot so this doesn't actually need to be merged.
I think an FAQ like 'Why do I see [27;5;13~ or [27;2;13~ when I press control/shift + enter?' is a better way to handle it.
I'd be happy to write the FAQ if you point me to where it needs to go

@rodrigogiraoserrao
Copy link
Contributor

I dug into this a bit more and I was able to find a workaround in foot so this doesn't actually need to be merged.

Excellent!

I think an FAQ like 'Why do I see [27;5;13~ or [27;2;13~ when I press control/shift + enter?' is a better way to handle it.

I think this is a bit niche for a F(requently)AQ, no?
Of course I may be misunderstanding something, but hitting Shift + Enter / Ctrl + Enter inside a TextArea for me just creates a next line!
(iTerm2 on MacOS).

One thing that would undoubtedly be useful is if you write a sentence or two about what you did on the foot side to circumvent this issue so it's documented here.

@twrightsman
Copy link

I use foot as well and would argue against mapping these combinations to Enter by default. I would like to map shift+enter to other things in my application.

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.

None yet

3 participants