mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[PR #21] [MERGED] Input updates and horizontal scrolling #335
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#335
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/21
Author: @zb140
Created: 2/19/2023
Status: ✅ Merged
Merged: 2/22/2023
Merged by: @zb140
Base:
stable← Head:zb/horiz-scroll📝 Commits (6)
3bd7555input cleanup and horizontal scrollingc290d09missed the version number change in testse4935c3fix indentationac0efd7feat: added paste support639ce89fix: proper UTF-8 to UTF-32 conversion, fixed tests712da0afix: docker build📊 Changes
12 files changed (+566 additions, -221 deletions)
View changed files
📝
.github/workflows/linux-build-test.yml(+1 -1)📝
Dockerfile(+1 -1)📝
docs/modules/protocols/pages/control-specs.adoc(+3 -1)📝
docs/modules/protocols/pages/input-data.adoc(+273 -121)📝
docs/modules/user/pages/quickstart.adoc(+1 -1)📝
src/input/CMakeLists.txt(+6 -0)📝
src/input/input/input.hpp(+37 -41)📝
src/input/platforms/linux/uinput.cpp(+131 -42)📝
src/input/platforms/linux/uinput.hpp(+6 -2)📝
src/moonlight/moonlight/protocol.hpp(+2 -2)📝
tests/platforms/linux/input.cpp(+104 -8)📝
tests/testMoonlight.cpp(+1 -1)📄 Description
The changes in this PR are analogous to these from Sunshine, which were a huge help in understanding how this stuff works 😄:
Previously, input packets were actually being distinguished based on packet size rather than the actual packet type fields. This worked reasonably well because nearly all packets had distinct sizes, with the notable exception of keyboard input and mouse scrolling. This PR switches to using the correct type field instead.
In addition, there's are two new packet types:
MOUSE_HSCROLL_PACKETfor horizontal scrollwheel events, andUTF8_TEXT_PACKETfor text events. Horizontal scroll events are fully implemented and tested, but UTF-8 text events currently only log a warning.Moonlight sends UTF-8 text events when it receives pasted text. On Windows, this is straightforward to implement because there is a
SendInputAPI that can take Unicode text; unfortunately on Linux, there is no such API. Instead, we'd have to "manually" convert the text to a series of key events -- I'm leaving that as an exercise for the future 😁🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.