-
Notifications
You must be signed in to change notification settings - Fork 570
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
TextBox: handle SELECT_ALL #1931
TextBox: handle SELECT_ALL #1931
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think simulate_input
is the right place to solve this, because iirc select_all is not necessarily something that is dispatched via IME.
To clarify: this is also currently broken on mac, even though mac does not use simulate input.
druid/src/widget/textbox.rs
Outdated
@@ -363,7 +363,6 @@ impl<T: TextStorage + EditableText> TextBox<T> { | |||
key if HotKey::new(SysMods::Cmd, "y").matches(key) && cfg!(windows) => { | |||
Some(sys::REDO.to(our_id)) | |||
} | |||
key if HotKey::new(SysMods::Cmd, "a").matches(key) => Some(sys::SELECT_ALL.to(our_id)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, this should be working, so if it isn't it's probably that we just aren't handling this command? We'll need this anyway, since select-all can arrive from a menu (and hence a Command
), and then it shouldn't be necessary to touch simulate_input
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we are not handling SELECT_ALL
.
This reverts commit d1aff0c.
Makes sense, I didn't have opinion on where this should be handled, just wanted this to be fixed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, this looks right. Oddly there's still an issue with the selection not causing a paint pass (even with a rebase), but we can worry about that afterwards. :)
still having that issue 🤕 |
Fixes #1854