Repository navigation
Forward the tablet's hardware keyboard and hide the Windows touch keyboard while it is attached - #8
Merged
Merged
Conversation
…board while it is attached
The Android client never forwarded KeyEvents. Message::Key existed and both hosts
injected it, but only gestures produced it.
- MainActivity forwards keys from physical alphabetic keyboards and keeps Android's
volume, power, home and media keys. Keys are mapped by key code to HID usages in
ezd-android keys.rs. Held keys are released on focus loss, pause and session stop.
- A key-down for a key already held is an autorepeat. The Windows host injects another
key-down because SendInput has no typematic, and the Linux host emits EV_KEY value 2.
Gesture combos no longer send the same usage twice.
- Protocol 0.6 adds ClientKeyboard { attached } (Control/17). The Android app reports it
from the configuration and no longer restarts MainActivity when a keyboard is attached.
- While attached, the Windows host sets HKCU TabletTip TouchKeyboardTapInvoke to 0 so taps
on text fields do not open the touch keyboard. It restores the original value on detach
and at session end, and keeps a crash marker under HKCU\Software\LibreStatic\ezdisplay
that is restored at startup.
FacuM
force-pushed
the
hardware-keyboard
branch
from
October 26, 2026 00:00
adfcd93 to
867eba2
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The tablet's hardware keyboard (for example a keyboard cover) now reaches the PC. Previously the Android client never forwarded KeyEvents, so only gestures could send keys. While a keyboard is attached, the Windows host also stops taps on text fields from opening the touch keyboard.
Changes
MainActivityforwards key events from physical alphabetic keyboards and keeps Android's volume, power, home and media keys. Key codes map to HID usages inezd-androidkeys.rs. Held keys are released on focus loss, pause and session stop. The activity no longer restarts when a keyboard is attached.ClientKeyboard { attached }(Control, 17). Documented indocs/protocol.md.TouchKeyboardTapInvokevalue under the HKCU TabletTip key to 0. The original value is restored on detach and at session end. A crash marker underHKCU\Software\LibreStatic\ezdisplayrestores the value at startup if the process died while the change was active.Scope notes
Verification
cargo test --workspace --exclude ezd-tray: passed.ezd-trayis excluded because the local rustc is older than it requires.cargo clippy --workspace --exclude ezd-tray --all-targets -- -D warnings: clean.cargo checkand clippy forezd-host-windowswithx86_64-pc-windows-msvc --no-default-features: clean../gradlew assembleFullDebug lintFullDebug testFullDebugUnitTest: successful.Not yet tested on real hardware. Manual checklist:
TouchKeyboardTapInvokereturns to its previous value after detaching the keyboard and after ending the session.