Add REPORT_MODS_SEPARATELY
to fix RDP modifier key reliability
#19436
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.
Description
QMK has trouble sending modifier keys (eg
LSFT(KC_TAB)
) to remote computer GUIs via software such as Microsoft's Remote Desktop, and the local Hyper-V viewer. The modifier is frequently lost, causing the unmodified key to be pressed instead. (Exactly how often the modifiers are lost seems to be environment-specific.)This PR adds the ability for QMK to report changes to modifiers separately from changes to keys. Users need only add
#define REPORT_MODS_SEPARATELY
to theirconfig.h
.In my testing so far, this completely resolves the issue for MS RDP and Hyper-V.
The other proposed solutions I've seen so far (eg #19405, and code snippets in the issues referenced below) all involve adding a delay somewhere in the QMK code. I found in my own testing that this type of solution is not adequate; it can reduce the frequency of occurrence, but it does not seem to completely eliminate it, and may not work with all QMK features. Tuning the delay is also a hassle, and a given delay amount may not even work optimally for all environments.
This solution may also make #4198 obsolete.
Other notes:
host_keyboard_send()
modifies the keyboard report for some configurations, I also swapped the order ofhost_keyboard_send()
andmemcpy()
. This change could (should?) be a separate PR.Types of Changes
Issues Fixed or Closed by This PR
Checklist