Repository navigation
feat: add Undo/Cut/Copy/Paste keycodes for Linux - #120
TinfoilSubmarine wants to merge 1 commit into
Conversation
ReenigneArcher
left a comment
There was a problem hiding this comment.
Could these new semantic keycodes be added to libvirtualhid’s public API and documentation instead of existing only as numeric literals inside the Linux backend?
KeyboardKeyCode is currently documented as a Windows-style virtual-key code, but this change gives 0x0100–`
15ae441 to
b1eeb72
Compare
b1eeb72 to
ab37aa1
Compare
|
ReenigneArcher
left a comment
There was a problem hiding this comment.
The earlier request to expose and document the semantic keycodes is addressed. The named constants and Linux uinput/XTest mappings are sound for the stated Linux scope; I found no blocking defect in that behavior. I left one nonblocking clarification about backend support in the public documentation.
GitHub confirms conflicts with current master (7cd296c). Please rebase and resolve the conflicts before merging, preserving the intervening keyboard mappings, keyboard capability filtering, and backend changes. The editing-key mappings are still absent from current master, so this PR's feature remains useful.
Validation: 13 focused Ubuntu WSL gtest cases passed using the exact PR mapping and emission functions with recorded uinput/XTest calls; two MSYS2 UCRT64 recorder probes verified the Windows fallback behavior. The three changed files passed the repository clang-format check. This does not establish a full project build, real Linux-device/X-server behavior, or native macOS validation. CI, CodeQL, and lint await maintainer approval; the GH-Pages documentation check timed out waiting for those jobs.
Review completed by Codex | Model: gpt-6.1-sol | Thinking: xhigh
ab37aa1 to
16fe842
Compare
|
Applied the suggested wording to the |
Expose the Undo/Cut/Copy/Paste editing keys as named semantic keycodes in the public API (lvh::keyboard_key_codes) with documentation, since they have no Windows virtual-key equivalent, and map them to the native Linux evdev keys and X11 keysyms in the backend.
16fe842 to
1b1fdcb
Compare
|



Description
Add Linux support for Undo/Cut/Copy/Paste keycodes (keyboard HID spec usage IDs 0x7A-0x7D). In order to do this I added some ad-hoc/bespoke keycodes. I'm unsure whether there is a better way to do this, especially something more platform-agnostic, but I only have Linux machines to test on here, so I limited scope to that.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.