Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Request xterm 'modifyOtherKeys' mode to opt-in CSI u key reporting
Various terminal emulators now support this `CSI > 4 ; 1 m` sequence to enable CSI u style reporting, opt into it on startup. Closes #4103
- Loading branch information
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after this commit kakoune leaves (kitty) terminal in bad state breaking other ncurses applications.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After quitting kakoune, can you pls run
cat
and press<c-c>
? If kakoune didn't emit exit sequence you would see^[[99;5u
. In my case everything is ok, kitty v0.20.3.47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it terminates cat. do ranger/htop/whatever (cursor keys) work for you?
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, cat exits, but if i press ctrlc inside ranger it does recieve
^[[99;5u
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right I cannot use F keys in htop after quitting kakoune. Manually issuing
printf '\033[>4;1m'
and thenprintf '\033[>4;0m'
doesn't break htop, which means problem most likely is not in kitty.47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be bug in kitty, not sure. Same workflow in iTerm2 doesn't brake htop.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having same issue with kitty. Checked with alacritty - works fine there. But I don't use alacritty.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kitty users: please try the following:
Run these commands:
cat
will just echo the encoding of the keys you pressPress
<f1>
, then<c-9>
, then<c-c>
to stopcat
^[OP
representing the F1 keypress^[[57;5u
representing Ctrl-9^C
representing Ctrl-CRun these commands:
cat
will just echo the encoding of the keys you pressPress
<f1>
, then<c-9>
, then<c-c>
to stopcat
^[OP
representing the F1 keypress^[[57;5u
representing Ctrl-9^C
representing Ctrl-CRun these commands:
cat
will just echo the encoding of the keys you pressPress
<f1>
, then<c-9>
, then<c-c>
to stopcat
^[OP
representing the F1 keypress9
representing Ctrl-9 (xterm) or nothing (tmux inside xterm)^C
representing Ctrl-CAll the "You should see" lines describe what I see inside the extended-key-reporting apps I have available to me, namely xterm and tmux 3.2a. If Kitty does something different, then... some people somewhere need to talk.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^[[P^[[57;5u^[[99;5u
and no way to stop cat^[OP9^C
^[OP9^C
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if you change it to:
...then everything works?
If so, it seems like when Kakoune switches to the alternate screen and enables extended key reporting, Kitty enables it only for the alternate screen, and you can't disable it unless you're still on the alternate screen. That's quite different from the way most terminal state works, so I assume it's deliberate for some reason I don't understand. It might be worth filing an issue against Kitty, if only to find out the reason and to give Kitty's author feedback about that particular design decision.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^[OP9^C
- does that mean it works?47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's what I'd expect
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Screwtapello thank you for your help! I have created a bug report, hopefully we can get it fixed sooner than later kovidgoyal/kitty#3742
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there's a quick response from the author and he says that the bug is in kakoune. I think someone more knowledgeable should take it further.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue is kakoune disables extended key reporting after switching to main screen.
47c0d20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created an issue for kakoune repo #4238