mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[PR #459] [MERGED] Fix modifier keys being instantly released when clients send side-specific VK codes #481
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#481
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/wolf/pull/459
Author: @LorenzoMorelli
Created: 7/20/2026
Status: ✅ Merged
Merged: 9/7/2026
Merged by: @ABeltramo
Base:
stable← Head:stable📝 Commits (1)
579e72afix(input): stop instantly releasing modifier keys held by the client📊 Changes
3 files changed (+58 additions, -12 deletions)
View changed files
📝
src/moonlight-protocol/moonlight/control.hpp(+8 -1)📝
src/moonlight-server/control/input_handler.cpp(+44 -11)📝
src/moonlight-server/events/events.hpp(+6 -0)📄 Description
Problem
keyboard_key()synthesizes "virtual modifiers" around everyKEY_PRESS: it presses the modifiers reported in the packet flags, presses the actual key, then immediately releases those modifiers. The guards that skip this dance when the pressed key is the modifier itself only compare against the generic Windows VK codes (M_SHIFT = 0x10,M_CTRL = 0x11), but clients (e.g. moonlight-qt) send the side-specific codes (VK_LSHIFT = 0xA0,VK_LCONTROL = 0xA2, ...).As a result:
Typical symptoms: hold-modifier actions in games don't work (e.g. Shift to sprint) and key-binding screens don't detect Shift/Ctrl, while text capitalization keeps working (the modifier state bit is briefly set around each letter). Alt is unaffected only by luck, since
M_ALThappens to be defined as the side-specific code (0xA4). This is likely the root cause of games-on-whales/gow#299.Fix
MOONLIGHT_MODIFIERSand recognize both families through amodifier_bit()helper.Note: the bug can go unnoticed on sessions using uinput virtual devices, because inputtino periodically re-presses the keys it still tracks as held (
cur_press_keys), so the wrongly released modifier comes back down after a few milliseconds. Sessions using the Wayland virtual keyboard have no such keep-alive, so the modifier stays released.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.