Repository navigation
fix(linux): map VK_ABNT_C1 to KEY_RO - #246
Merged
ReenigneArcher merged 1 commit intoDec 2, 2026
Merged
Conversation
The dedicated "/ ?" key on Brazilian ABNT2 keyboards is VK_ABNT_C1 (0xC1). The Linux keyboard table had no entry for it, so the key was rejected as unsupported. Map it to KEY_RO, the evdev code that XKB exposes as <AB11> and the br layout binds to slash/question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ReenigneArcher
approved these changes
Dec 2, 2026
7 of 18 tasks
Contributor
Author
|
Companion Sunshine PR (forwards Moonlight's flagged |
1 task done
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #246 +/- ##
==========================================
- Coverage 73.70% 73.69% -0.02%
==========================================
Files 45 45
Lines 9940 9940
Branches 3706 3706
==========================================
- Hits 7326 7325 -1
Misses 2232 2232
- Partials 382 383 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The Linux backend's
key_code_to_linux()table has no entry forVK_ABNT_C1(0xC1), the dedicated/ ?key on Brazilian ABNT2 keyboards. Unmapped codes return -1, so the key is rejected ("keyboard key code is not supported by the Linux backend"). The Windows backend already handles it (keylayout.hpp:115, /* 0xc1 */).This adds
{0xC1, KEY_RO}.KEY_RO(evdev 89) is the kernel code of the ABNT2 slash key, XKB<AB11>, whichsymbols/brmaps toslash question degree questiondown. On non-ABNT2 host layouts it lands on an unmapped position, like other layout-specific keys.Note for Sunshine: Moonlight clients send this key as
0xE2withSS_KBE_FLAG_NON_NORMALIZED, not as0xC1. A companion Sunshine PR forwards that flagged0xE2as0xC1on Linux, so both pieces are needed for Moonlight users.Screenshot
Issues Fixed or Closed
/ ?key) — key is silently dropped SunshineStream/Sunshine#6051Roadmap Issues
Testing
Unit test: added
linux_key_code(0xC1) == KEY_ROtoLinuxBackendTest.TranslatesKeyboardKeys.test_linux_backend.cpp:104: Failure ... Which is: -1.LinuxBackendTest.*tests (cmake-build-debug/tests/test_libvirtualhid --gtest_filter='LinuxBackendTest.*', GCC 16, Arch).Real hardware: tested with this change plus the companion Sunshine change, built into Sunshine 2026.914.233613.
brxkbcli interactive-waylandon the host:Not run: the Windows/macOS builds and the full CI matrix. The change is limited to the Linux table and its test.
Type of Change
Checklist
AI Usage
See our AI usage policy.
Claude Code diagnosed the key path (Moonlight → Sunshine → libvirtualhid → XKB), wrote the change and test, and ran the local validation. I tested the result on my own hardware and ABNT2 keyboard.
Generated with Claude Code (agent) using Claude Opus 5.5 (
claude-opus-5-5), thinking level: low.🤖 Generated with Claude Code