[OSX] Cmd-tabbing back and forth causes cmd key state to get out of sync
CMD-tabbing back and forth between Unity and other apps sometimes causes the CMD key to get stuck. This is probably related to the backend not resetting keyboard state properly in sync with focus changes.
Thinking about it, the current reset logic isn't really good. Instead of requiring backends to respect focus, what we should do is have a device reset IOCTL that blanks the device state at the source (where such a state actually exists). With this in place, we can handle reset much more flexibly instead of having it hardcoded into native to focus change.
Issue does not happen on 2019.1.0b3 with 758cb038 Stable.
This happens in 2019.4 and Input System 1.0.0. See https://issuetracker.unity3d.com/issues/input-system-macos-keyboard-button-a-is-triggered-when-taking-a-screenshot-with-built-in-tools