Skip to content

⌘ + Backspace and ⌘ + Delete macOS Shortcuts in text_input#2862

Merged
hecrj merged 1 commit intoiced-rs:masterfrom
andymandias:text_input-command_shortcuts
Nov 24, 2025
Merged

⌘ + Backspace and ⌘ + Delete macOS Shortcuts in text_input#2862
hecrj merged 1 commit intoiced-rs:masterfrom
andymandias:text_input-command_shortcuts

Conversation

@andymandias
Copy link
Copy Markdown
Contributor

@andymandias andymandias commented Mar 26, 2025

These changes add support to text_inputs for the macOS shortcuts:

  • ⌘ + Backspace: Delete from cursor to start of line
  • ⌘ + Delete: Delete from cursor to end of line

Edit to try to be clearer about the secondary change made in the process of adding the shortcuts:

For delete-by-word on a secure text_input, where the word boundaries should not be exposed, the deletion was instead being made to the start/end of the text_input. For move/select-by-word on a secure text_input, the move/selection was being made by one character. For consistency, I modified the move/select-by-word behavior for secure text_input to match the range of movement in the delete-by-word behavior. I.e. I changed move/select-by-word behavior for a secure text_input to move/select to the start/end of the text_input.

@andymandias andymandias force-pushed the text_input-command_shortcuts branch from 4827424 to b522c35 Compare September 6, 2025 20:18
…_input`.

Additionally, prevent move-by-word when `text_input` is secure.
@andymandias andymandias force-pushed the text_input-command_shortcuts branch from b522c35 to e709fdc Compare September 9, 2025 19:27
@hecrj hecrj added this to the 0.14 milestone Nov 24, 2025
@hecrj hecrj added improvement An internal improvement text widget change labels Nov 24, 2025
Copy link
Copy Markdown
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hecrj hecrj merged commit 190b9f6 into iced-rs:master Nov 24, 2025
15 checks passed
@andymandias andymandias deleted the text_input-command_shortcuts branch November 24, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Cmd + Delete to delete until start of line

2 participants