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 + backspace doesnt work? or its not supported, cuz linux terminal stuff? #723

Closed
alexzanderr opened this issue Oct 21, 2022 · 3 comments

Comments

@alexzanderr
Copy link

hello.

love your crate.

                    KeyEvent {
                        code: KeyCode::Backspace,
                        modifiers: event::KeyModifiers::CONTROL,
                        ..
                    } => {
                        // do something with the control backspace
                    },

i've seen that this combination doesnt work. should this work? is it supposed to be working? its a bug?

but this combination is working:

                    KeyEvent {
                        code: KeyCode::Backspace,
                        modifiers: event::KeyModifiers::ALT,
                        ..
                    } => {
                        // do something with the control backspace
                    },

what is happening? what am i missing?

from all command-line apps that i've interacted with (the rust ones, im talking about) none of them was able to make ctrl+backspace to work, only alt+backspace was working by default.
is this issue the reason for these apps?

im using crossterm = "0.25.0"

thanks in advance.

@TimonPost
Copy link
Member

Thanks for filing issue, this missing combination is already reported here: #685. Either not implemented or can not be handled. Closing this issue in favour of that tracking issue.

@alexzanderr
Copy link
Author

sure, thanks for your response

@alexzanderr
Copy link
Author

actually found out that ctrl+backspace works, but its not what was expected.

                    KeyEvent {
                        code: KeyCode::Char('h'),
                        modifiers: event::KeyModifiers::CONTROL,
                        ..
                    } => {
                        user_input.clear();
                        self.term
                            .print("you pressed control backspace", 20, 0)?
                            .refresh()?;
                    },

you know that in linux terminals actually ctrl+backspace is ctrl+h.

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

No branches or pull requests

2 participants