[KBM]Set extended flag for media keys #25576
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Keyboard manager is sending scancodes for media keys which are being interpreted in some applications as other keys, as is exemplified in the issue this PR closes ( #25463 ).
This is caused by us sending the scancode without prefixing it with
e0
as expected for extended keys (which in key events means adding the KEYEVENTF_EXTENDEDKEY flag to the event).This PR adds the Windows Multimedia keys to the list of keys we're sending the extended flag. Source used to select the keys is: https://tigerheli.mameworld.info/encoder/scancodesset2.htm
PR Checklist
Validation Steps Performed
As mentioned in the issue, used https://en.key-test.ru/ to verify that, without the fix, mapping a key to Volume Down was registering the key
C
as well.With the fix, using a key mapped to volume down no longer registers
C
.