flutter/packages/flutter_test/lib
Greg Spencer c5dd3ec47a
Fix stuck keys when shift is released before the letter. (#51095)
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).
2020-02-21 14:13:38 -08:00
..
src Fix stuck keys when shift is released before the letter. (#51095) 2020-02-21 14:13:38 -08:00
flutter_test.dart License update (#45373) 2019-11-27 15:04:02 -08:00