feat(hid): map Windows Alt to iPad Globe - #5
Open
s-qin wants to merge 1 commit into
Open
Conversation
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.
Motivation
OpenSpan currently ships with Windows Alt mapped to iPad Command. Windows
Win/GUI already maps to the HID GUI modifier, which iPadOS treats as Command,
so the default layout gives two physical modifiers the same role.
The natural Command entry remains the Windows key. Ideally a PC Fn key could
provide iPad Globe, but many laptop Fn keys are handled below Windows in
firmware / the embedded controller and never reach
WH_KEYBOARD_LL. On theLenovo Y9000P used for the real-hardware test, pressing Fn alone produced no
VK/scancode event in a keyboard-event tester, so a generic Fn -> Globe mapping
is not available to OpenSpan.
This feature intentionally uses a cross-platform UX mapping instead:
It preserves every Command shortcut while exposing the iPadOS Globe system
shortcut layer on ordinary Windows keyboards without relying on vendor-specific
Fn firmware behavior.
Technical basis
Globe is not a ninth bit in the normal HID keyboard modifier byte. The feature
adds a separate HID Consumer Control input report:
0x0C)0x029D)303 01(ID 3, Input)9D 0200 00This is standards-based Globe system-shortcut support. It does not claim
to emulate the complete Apple vendor Top Case Fn usage (
0x00FF:0x0003) orits Fn+Backspace / Fn+Arrow semantics.
Implementation
alt: cmdtoalt: globe; Win/GUIremains the existing Command modifier path.
keys.
chords, owner TCP disconnect, and BLE disconnect.
held Globe state.
consumer_subscribedseparately without changing existing keyboardreadiness behavior.
Validation
Automated:
py_compile: PASSgit diff --check: PASSwin/test_pair_flow.pyhas the same eightexisting UI expectation failures on untouched upstream/main; this feature
does not modify that flow.
Real hardware (iPadOS over BLE HOGP):
Protocol references
0x029D, AC Next Keyboard Layout Selectvalidation
GLOBE/C_AC_NEXT_KEYBOARD_LAYOUT_SELECTdefinitionhid-appleand Apple IOHID sources for the separate vendor Fn usage