rio icon indicating copy to clipboard operation
rio copied to clipboard

Delete key doesn't work in kitty mode

Open MrPandir opened this issue 1 year ago β€’ 12 comments

I get the  character (U+F728) when I press fn + backspace. I expect this to match delete as it does without the kitty protocol.

This is probably the same problem as #194, this also needs to be applied in the kitty protocol.

MrPandir avatar May 23 '24 20:05 MrPandir

@MrPandir could you test with latest main?

raphamorim avatar Aug 26 '24 06:08 raphamorim

@MrPandir could you test with latest main?

Still reproducible.

To test, I run the command kitten show-key -m kitty and press fn + backspace. Although this shows that the DELETE PRESS key was pressed, adding the character makes programs think that it is just a character and not a key was pressed.

Kitty

DELETE PRESS
CSI 3 ~

DELETE RELEASE
CSI 3 ; 1 : 3 ~

Rio (head c88f9e4)

DELETE PRESS 
CSI 3 ; 1 ; 63272 ~

DELETE RELEASE
CSI 3 ; 1 : 3 ~

ENTER is from command input, kitty absorbs it, this is also a problem, but it is not related to this issue.

ENTER RELEASE
CSI 13 ; 1 : 3 u

MrPandir avatar Aug 26 '24 08:08 MrPandir

Ah ok, so the issue only happens if you press along with Fn right

raphamorim avatar Aug 26 '24 09:08 raphamorim

@MrPandir could you test again? I think I understood the issue.

Screenshot 2024-08-26 at 18 51 56

raphamorim avatar Aug 26 '24 16:08 raphamorim

@MrPandir could you test again? I think I understood the issue.

Not sure what the problem is, but I'm using nushell and it still somehow gets that character. It doesn't show up in kitty terminal. πŸ€”

In order not to install nushell you can use docker:

docker run --rm -ti hustcer/debian-nu:0.97-node.20.17.lts

Enable kitty protocol:

$env.config.use_kitty_protocol = true

And you can use keybindings listen, also if you just type fn + backspace in the input field it will also appear.

MrPandir avatar Aug 27 '24 07:08 MrPandir

Hmm weird, I am pressing fn+backspace and don't get the character. πŸ€”

Screenshot 2024-08-27 at 10 02 47

(Is this only happening when running with docker?)

raphamorim avatar Aug 27 '24 08:08 raphamorim

sorry forgot to share with keybindings listen

Screenshot 2024-08-27 at 10 06 02

raphamorim avatar Aug 27 '24 08:08 raphamorim

Hmm weird, I am pressing fn+backspace and don't get the character. πŸ€”

It seems you forgot to enter $env.config.use_kitty_protocol = true before testing. Because by default nushell does not use kitty protocol. That's why you get normal behavior.

(Is this only happening when running with docker?)

No, I use nushell as a shell on Mac, and I provided the docker commands, in case you don't like cluttering your computer with utilities you don't use. 😁

MrPandir avatar Aug 27 '24 08:08 MrPandir

In the main branch the kitty protocol is enabled by default. I am trying to fix the remaining issues to enable it for next version. πŸ™

raphamorim avatar Aug 27 '24 08:08 raphamorim

In the main branch the kitty protocol is enabled by default. I am trying to fix the remaining issues to enable it for next version. πŸ™

Kitty protocol is disabled by default. The use of the kitty protocol must be enabled in the config, or at the beginning of the session, enter the command that I wrote above. https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_config.nu#L266

MrPandir avatar Aug 27 '24 09:08 MrPandir

I see, thought it was use-kitty-protocol-keyboard from Rio. I tried to switch the config in nu but got this message:

Screenshot 2024-08-27 at 15 55 01

Do you have an idea what could it be?

raphamorim avatar Aug 27 '24 13:08 raphamorim

I see, thought it was use-kitty-protocol-keyboard from Rio. I tried to switch the config in nu but got this message:

You may be using an old version of nushell. And also you have not updated the config, as critical changes are made to it. πŸ€”Simple solution: update to the latest version and delete the config. The config is located at $nu.config-path

MrPandir avatar Aug 27 '24 15:08 MrPandir

I pushed many refactors to main branch, fixed some weird stuff, could you test again?

raphamorim avatar Jan 15 '25 18:01 raphamorim

Looks it fixed

Before:

Image

After:

Image

Closing this issue for now, thank you!

raphamorim avatar Jan 19 '25 18:01 raphamorim

It's working. Thank you very much. ❀️

MrPandir avatar Jan 20 '25 17:01 MrPandir