Repository navigation
feat: add Undo/Cut/Copy/Paste keycodes #5591
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
Open
TinfoilSubmarine
wants to merge
1
commit into
LizardByte:master
Choose a base branch
from
TinfoilSubmarine:undo_cut_copy_paste
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+175
−4
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Submodule libvirtualhid
updated
7 files
| +65 −41 | .github/workflows/ci-build.yml | |
| +10 −1 | docs/development.md | |
| +20 −3 | src/include/libvirtualhid/types.hpp | |
| +11 −2 | src/platform/linux/uhid_backend.cpp | |
| +3 −1 | tests/CMakeLists.txt | |
| +26 −0 | tests/msvc-coverage.config.in | |
| +9 −0 | tests/unit/test_linux_backend.cpp |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Preserve the full editing keycode when releasing held keys
Keeping
0x0100–0x0103here introduces a cleanup mismatch:reset_keyboard_keys()still callsmap_keycode(vk_from_kpid(key) & 0x00FF). If a client sends Paste down and disconnects before Paste up, Sunshine emits down for0x0103, then cleanup emits up for0x03and marks the tracked key released. The pinned Linux backend rejects that release code, leaving Paste held and potentially repeating after disconnect. Undo/Cut/Copy and remapped editing keys have the same problem.In
src/input.cpp, insidereset_keyboard_keys(), remove the byte mask while retaining the configured remap and the existing flags/extended arguments after rebasing:map_keycode(vk_from_kpid(key))Add disconnect coverage for both the scancode aliases and dedicated keycodes, plus a remapped editing key. For example, append this test to
tests/unit/test_keyboard.cpp, using its existing recorder fixture:Run with the repository's MSYS2 UCRT64 prefix and
cmake-build-<name>/tests/test_sunshine --gtest_filter=KeyboardPassthroughTest.ReleasesHeldEditingKeysWhenClientDisconnects. The cleanup correction was validated in the focused extracted-function harness; this fixture-level snippet has not been run in a full Sunshine build.Review completed by Codex | Model: gpt-6.1-sol | Thinking: xhigh