-
-
Notifications
You must be signed in to change notification settings - Fork 881
core: Implement TextField control characters #2081
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
Conversation
I was thinking maybe we should add a separate enum to handle keyboard control/navigation commands, i.e. something like PlayerEvent::TextControl that would have MoveLeft, SelectAll, Copy, PageUp, etc., and this could be handled by a separate method on the textfield. This way these commands are explicit, as opposed to being dumped into the ASCII control characters (e.g. on Mac, where Cmd+C is different from Ctrl+C, Ctrl+Ins for copy on Windows). |
f10dfad
to
f303c00
Compare
Hey, sorry for the wait. I've added the I couldn't figure out how to check if Ruffle is running on MacOS on web so I've just left this as a TODO. Also, should I move the following to this
|
Yes, I'd say lets try to get all of the navigation and control commands into one code path. |
I've moved Delete and Backspace to For those copy events, it looks like we'd need to enable the unstable apis in |
I think enabling the unstable APIs is fine (we are somewhat on the bleeding edge of things, so we can deal with APIs breaking from time to time). |
Hello, you forgot to add Page Up and Page Down to the TODO list :) |
Is there any update on progress? |
I updated and finished this PR in #11059. Thanks so much for your work on this! |
This pr implements some control character handling for text fields (eg CtrlC, CtrlV).
I'm submitting this as a draft to make sure that I'm going about this the right way.
TODO