• Greg Spencer's avatar
    Fix stuck keys when shift is released before the letter. (#51095) · c5dd3ec4
    Greg Spencer authored
    This fixes a problem where if you press "Shift" and then "A", then release "Shift" and then "a", then the "A" key will be "stuck" on because the logical key for the key down message is different (capital "A") from the logical key for the key up message (lowercase "a").
    
    This PR changes the pressed keys logic so that it uses the physical key to add/remove keys from the list of pressed keys, but keeps the associated logical key.
    
    This does mean that after the "Shift" key goes up, the pressed keys contains a capital "A" and it doesn't switch to be a lowercase "a", but there isn't currently any mechanism we can use to do that remapping. This is far less surprising than the current behavior, but is still not quite correct.
    
    I fixed the event simulation code to take a physicalKey so that it could be matched with the logical key, but the event simulation code isn't up to the task, since it can only simulate keys that appear in the key maps. The new platform key event design should fix that (added TODOs).
    c5dd3ec4
Name
Last commit
Last update
..
actions.dart Loading commit data...
animated_icons.dart Loading commit data...
card_collection.dart Loading commit data...
color_testing_demo.dart Loading commit data...
density.dart Loading commit data...
drag_and_drop.dart Loading commit data...
focus.dart Loading commit data...
hover.dart Loading commit data...
main.dart Loading commit data...
material_arc.dart Loading commit data...
overlay_geometry.dart Loading commit data...
page_view.dart Loading commit data...
raw_keyboard.dart Loading commit data...
text.dart Loading commit data...