-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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+X, C, V events get cut out #4065
Comments
Maybe it could be an opt-in feature? Apparently these events are only used internally by the text widgets, but I'm guessing a lot of people would like to have them by default and not have to implement them manually. There's also undo and redo, which are not events but have hardcoded shortcuts in the egui/crates/egui/src/widgets/text_edit/builder.rs Lines 884 to 920 in ca8c879
Maybe Copy/Cut/Paste could be handled the same way? And eventually with modifiable shortcuts you can set in the Ui's style or something like that. |
It's just some sort of programs that want to implement that manually - as said UI libs don't do that for reasons. This is more limiting in big programs, where you can remap commands. |
Didn't know this was a thing until now. |
I know what a workaround is - it's just an unexpected behavior for a UI lib IMO. |
I'm making an image editor and the above-described workaround doesn't work for me, the paste event doesn't fire at all if image data is on the clipboard. I'm using a separate library (arboard) for clipboard data access so I don't need the data, just the fact that a ctrl+v happened. I'm calling |
... still a thing. It's really in the way of making a non trivial program with egui :(. There is no cut/copy/paste system event - so this is pure nonsens IMO. I need to handle clipboard with another library because I need a custom clipboard format so egui messes up the "paste" event - no way to "replace" the events since it tempers witih the clipboard. |
It seems that the I guess one quick thing that could be done would be to add a |
A possible solution may be as well: |
They're replaced by cut/copy/paste commands.
Egui is the wrong layer for that - this is clearly an application feature and not a UI library one. I've an application that needs ctrl+x/c for input. With an event chain both events could be included however I would recommend not providing cut/copy/paste events in the first place. Don't know of any UI library handling that on this level.
Esp. applications may remap key binds that may break it. Or give some options to specify the behavior there.
The text was updated successfully, but these errors were encountered: