Linux keyboard backend has no mapping for VK_ABNT_C1 (ABNT2 dedicated `/ ?` key) — key is silently dropped
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Read libvirtualhid's src/platform/linux/uhid_backend.cpp and locate the key_code_to_linux() special_keys table; compare the Linux mapping with src/platform/windows/keylayout.hpp and the suggested KEY_RO mapping. Check whether VK_ABNT_C2 needs handling while editing. Done when VK_ABNT_C1 maps to KEY_RO and the Linux backend accepts it; the related Moonlight client change is described in moonlight-qt#1944.
Written by the indexing model from the issue text.
Description
Is this a new bug?
- I have searched existing issues and this has not been reported before (no ABNT/ABNT_C1 results in LizardByte/Sunshine or LizardByte/libvirtualhid).
Describe the bug
The dedicated / ? key of a Brazilian ABNT2 keyboard is dropped on Linux hosts. Windows maps this key to the Brazil-specific VK_ABNT_C1 (0xC1, scan code 0x73), but Sunshine's Linux keyboard path has no mapping for it, so pressing the key types nothing regardless of the host's keyboard layout.
All other ABNT2 keys round-trip correctly once the host session layout is br (ABNT2) — only this key is lost.
Expected behavior
VK_ABNT_C1 should reach the host and produce / (? with Shift) when the host layout is ABNT2, the same way Windows hosts already handle it.
System File Check output
Current Directory: /home/machadex/.config/sunshine
Version: 2026.1103.235308 (commit: 019b1ba)
OS: CachyOS (Arch-based), Linux, KDE Plasma 6.8.2 on Wayland
GPU: NVIDIA (nvenc), capture: kwin
Details / evidence
Client: Moonlight for Windows (current stable), ABNT2 keyboard; host: Sunshine 2026.1103.235308.
-
Official Windows layout — KBDBR.DLL (Portuguese Brazil ABNT2, via
kbdlayout.infoKBDTABLES dump) assigns:;/:→ scan 0x35,VK_OEM_2(0xBF)\/|→ scan 0x56,VK_OEM_102(0xE2)//?→ scan 0x73,VK_ABNT_C1(0xC1) ← the affected key
-
Linux conversion table —
key_code_to_linux()in libvirtualhidsrc/platform/linux/uhid_backend.cppholds a fixed 48-pair table of US positions and has no0xC1entry (sequence:0xBF→53 KEY_SLASH,0xC0→41 KEY_GRAVE, then directly0xDB→26). Verified both in master source and in the shipped binary (thepair<u32,u32>array at file offset0x2c3a1a0of/usr/bin/sunshine2026.1103). Unmapped codesreturn -1→ "keyboard key code is not supported by the Linux backend". -
Windows backend already handles the key — libvirtualhid
src/platform/windows/keylayout.hppcontains115, /* 0xc1 */(scan 0x73), so Windows hosts accept it. The gap is Linux-only.
Suggested fix
Add to the Linux special_keys table:
{0xC1, KEY_RO}, // VK_ABNT_C1 — ABNT2 dedicated slash key
KEY_RO (evdev 89) is the kernel code of the ABNT2 extra slash key — XKB <AB11> (keycode 97), which symbols/br maps to [slash, question, degree, questiondown]. On non-ABNT2 host layouts it lands on an unmapped position, exactly like other layout-specific extra keys. Consider VK_ABNT_C2 (0xC2) as well while touching this.
Related upstream
For the key to work end-to-end, the client also needs to start sending it: Moonlight for Windows currently discards the key before it hits the wire — confirmed with min_log_level = debug on Sunshine (no keyboard packet at all when pressing it). moonlight-stream/moonlight-qt#1789 reports that and PR moonlight-stream/moonlight-qt#1944 fixes it. Once that lands, Linux hosts will deliver 0xC1 into the unmapped table above — this fix is the second half.
Workaround
With the host layout set to br, AltGr+Q produces / and AltGr+W produces ? (level-3 mappings in symbols/br).
- Dominant language
- C++
- Stars
- 43k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LizardByte/Sunshine
-
PIN pairing fails with "Missing CSRF token" - web UI never fetches/attaches the tokenMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
LizardByte/Sunshine#5467 · 2 comments ·
-
Difficulty 4/5 1-2 days Newbie friendliness 30/100
LizardByte/Sunshine#6103 · 1 comment ·
-
XDG portal: after a display briefly disappears, capture never recovers ("no more input formats" loop) in 2026.1113.231225; 2026.914 recoversPossibly taken @ReenigneArcher claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 18/100
LizardByte/Sunshine#6101 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
LizardByte/Sunshine#6080 · 2 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
LizardByte/Sunshine#6072 ·
All issues in LizardByte/Sunshine
Similar issues
-
std::fdim drops partial derivative w.r.t second argument in forward and reverse modePossibly taken @ADITYASINGH1206 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
vgvassilev/clad#2534 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
HAP.cpp fixOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100