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

Support CTRL + DELETE and CTRL + BACKSPACE to delete word #4524

Closed
2 tasks done
Jacalz opened this issue Jan 7, 2024 · 3 comments
Closed
2 tasks done

Support CTRL + DELETE and CTRL + BACKSPACE to delete word #4524

Jacalz opened this issue Jan 7, 2024 · 3 comments
Labels
enhancement New feature or request Keyboard Items for keyboard control

Comments

@Jacalz
Copy link
Member

Jacalz commented Jan 7, 2024

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

We should support the common feature of pressing CTRL + BACKSPACE to remove a word to the left and CTRL + DELETE (Option (alt) + backspace on macOS) to delete a word to the right in the Entry widget.

Is it possible to construct a solution with the existing API?

Yes. See #4084 that I dropped due to some bugs I didn't have time to figure out.

Describe the solution you'd like to see.

Implement support for deleting whole words to the right and left with simple keyboard shortcuts.

@Jacalz Jacalz added enhancement New feature or request Keyboard Items for keyboard control labels Jan 7, 2024
@sdassow
Copy link
Contributor

sdassow commented Jan 8, 2024

Totally in in favor of this idea. What is common though? For a more complete list of different shortcuts: https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts#Text_editing
In my projects I've been adding CTRL-A/CTRL-E for beginning/end of line jumping for example, so a bit similar to what readline supports.

@Jacalz
Copy link
Member Author

Jacalz commented Jan 8, 2024

It seems to me like CTRL + Del and CTRL + Backspace seem to be the most common. We just need to make sure that macOS uses the option key instead.

@dweymouth
Copy link
Contributor

On develop for release in 2.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Keyboard Items for keyboard control
Projects
None yet
Development

No branches or pull requests

3 participants