Revert "Revert "Take the input device into account for meta state""

This reverts commit 3954fd9a05232cb6f7fc52aa49a0b34c1539028a, which
is equivalent to re-applying 8a1597b39632956cdbcb6b76874ccca786047d4c.

The change ("Take the input device into account for meta state") was
valid but caused CTS test failures because the test was wrong. The
test injected a key event with the meta state missing. This faulty
test was masked by the old toggle behavior.
8 files changed