Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(win/input): use active keyboard layout for non-normalized key events #3125

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Sep 3, 2024

Description

When the client couldn't normalize their keyboard event to a US English layout, we don't know for sure which scan code to use in the keyboard event. Instead of assuming the non-normalized event is from a US English layout, make a better guess by using the host's current keyboard layout. As before, users can still disable the "Always Send Scancodes" option to send the VK code, which will always be correct but has reduced game compatibility.

Screenshot

Issues Fixed or Closed

Fixes #2463

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 9.70%. Comparing base (dce250d) to head (db75b3e).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/platform/windows/input.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #3125      +/-   ##
=========================================
- Coverage    9.70%   9.70%   -0.01%     
=========================================
  Files          77      77              
  Lines       14072   14074       +2     
  Branches     6459    6460       +1     
=========================================
  Hits         1366    1366              
- Misses      10086   10088       +2     
  Partials     2620    2620              
Flag Coverage Δ
Windows 5.06% <0.00%> (-0.01%) ⬇️
macOS-12 10.76% <ø> (+0.01%) ⬆️
macOS-13 10.67% <ø> (-0.02%) ⬇️
macOS-14 10.96% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/windows/input.cpp 0.66% <0.00%> (-0.01%) ⬇️

@cgutman cgutman enabled auto-merge (squash) September 5, 2024 02:33
Copy link

sonarcloud bot commented Sep 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@cgutman cgutman merged commit 49319d7 into LizardByte:master Sep 5, 2024
34 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect keyboard mapping using a QWERTZ (de_DE) keyboard using an Android Moonlight client
1 participant