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 to delete last word #9

Closed
RomanHauksson opened this issue May 4, 2022 · 3 comments
Closed

ctrl+backspace to delete last word #9

RomanHauksson opened this issue May 4, 2022 · 3 comments
Labels
blocked enhancement New feature or request

Comments

@RomanHauksson
Copy link

Problem

When I press Ctrl+Backspace, I'd expect the last word to be deleted – this is the behavior of most text input boxes, and Monkeytype. Instead, it adds a new character.

Solution

I don't know exactly how to implement this feature. It could be an optional argument in the CLI.

Additional context

Video demonstrating the behavior. I mistype the word "possible" and attempt to delete the whole word.

Thokr_ctrl+backspace.mp4
@RomanHauksson RomanHauksson added the enhancement New feature or request label May 4, 2022
@jrnxf
Copy link
Owner

jrnxf commented May 5, 2022

Unfortunately this is a limitation of the terminal backend crossterm which handles user input. Essentially the control modifier never registers when a user hits backspace. You can read more about the issue here.

I'm keeping a close eye on this issue myself because I also want to see this added! I'm glad you said what you did though, because in my head ctrl+backspace should delete the whole line back to the beginning, but I think going back to the start of the current word makes more sense for what this is. You mentioned that most typing tests do that, but out of curiosity if you press ctrl+backspace in a normal text field or document, does it delete the entire line as it does for me? That's always what I've associated ctrl+backspace as doing.

@jrnxf jrnxf added the blocked label May 5, 2022
@RomanHauksson
Copy link
Author

Ah, that's tough! I guess we'll just have to wait on that crossterm issue. Ctrl+backspace does just delete the last word for me, I assumed that's how it works for most people – never heard of it deleting a line. TIL

@jrnxf
Copy link
Owner

jrnxf commented May 29, 2022

Closing this just because I have my eyes on the issue and know it's main blocker!

@jrnxf jrnxf closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants