-
Notifications
You must be signed in to change notification settings - Fork 6k
[Web, Keyboard] Implement FlutterHtmlKeyboardEvent.keyCode and defaultPrevented, and rename Keyboard to RawKeyboard
#34626
Conversation
d24ae3f to
4df9b9b
Compare
Keyboard to RawKeyboard
Keyboard to RawKeyboardFlutterHtmlKeyboardEvent.keyCode and defaultPrevented, and rename Keyboard to RawKeyboard
71532e8 to
42ca518
Compare
42ca518 to
917d149
Compare
917d149 to
a926e1a
Compare
|
Sorry, @dkwingsmt this one slipped through the cracks. Do you still want to submit it? |
|
If so, I'm happy to review it. |
|
@gspencergoog Yes, please review it, thank you! |
gspencergoog
left a comment
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.
| converter.handleEvent(keyDownEvent('KeyA', 'a')); | ||
| converter.handleEvent(keyUpEvent('KeyA', 'a')); | ||
| converter.handleEvent(keyUpEvent('KeyA', 'a')); | ||
| event = keyDownEvent('KeyA', 'a'); |
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.
What's the reason for splitting these into two lines each everywhere instead of one? To me, they seem a lot more readable as one line.
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.
It was used to hold the created event object and verify the defaultPrevented. I have changed it by adding a lastDefaultPrevented static field to the mock class.
|
Gold has detected about 4 new digest(s) on patchset 5. |
…` and `defaultPrevented`, and rename `Keyboard` to `RawKeyboard` (flutter/engine#34626)

This PR implements
keyCodeanddefaultPreventedofFlutterHtmlKeyboardEvent. ThekeyCodewas deemed useful in an earlier PR but was missing from this class, whiledefaultPreventedreplaces a long-standing hack used bykeyboard_converter_test.dart. No semantic changes are made to the tests, except for line 613 and line 637 where the results are changed to true because the previous results are no longer cleared.Also, this PR renames
KeyboardtoRawKeyboard. Started as the only keyboard processor,Keyboardnow handles the legacy "raw keyboard" system, one of the two keyboard processing systems. The rename aligns with its role change, and is a precursor to a later change, where we embedRawKeyboardas part ofKeyboardBindingso that the two processing systems can share the same event listeners as entrances.Other minor changes include:
MockKeyboardEventinto a separate file, and implemement itsmodifierState.KeyboardBinding's now redundant parameterglassPaneElement.Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.