core: Implement TextField control characters#2081
core: Implement TextField control characters#2081JMcKiern wants to merge 3 commits intoruffle-rs:masterfrom
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