Skip to content

feat(rdp): multi-tab workspace window, 4-state immersive maximize and numeric keypad fix - #11

Merged
xiaochengzjc merged 3 commits into
AtomUICommunity:masterfrom
heartacker:PR-FIX
Nov 29, 2026
Merged

xiaochengzjc merged 3 commits into
AtomUICommunity:masterfrom
heartacker:PR-FIX

Conversation

@heartacker

Copy link
Copy Markdown
Contributor

What's Changed

Multi-tab RdpWorkspaceWindow and 3-mode window workflow

  • Ports Views/RdpWorkspaceWindow so an RDP session can live in a dedicated multi-tab window, alongside the existing tab-in-main-window and detached-window flows (19 files, +788/-36).

4-state immersive maximize and workspace handoff in DetachedTabWindow

  • Ports the 4-state window presentation (windowed, maximized, keep-taskbar full screen, immersive full screen) and the workspace handoff wiring in DetachedTabWindow (+62/-5).

Numeric keypad scancodes (fix)

  • RDP sessions sent numpad digits 1-9 with wrong PS/2 set-1 scancodes: they were derived arithmetically from the Key enum order (0x52 + digit), but only NumPad0 sits at 0x52 - digits 1-9 occupy the physical grid 0x47-0x51. NumPad1 was sent as the keypad decimal (0x53) and NumPad5/NumPad6 as F11/F12, which made the numeric keypad type garbage or nothing and made local NumLock toggling appear to have no effect.
  • The digits now go through a Services/RdpKeyboardScancodes lookup table, and the local NumLock/CapsLock/ScrollLock state is re-asserted to the remote through a synchronize event after each toggle key-up, so the remote LED state cannot drift from the local one (mstsc behaviour).
  • Adds RdpKeyboardScancodesTests (14 regression cases) and documents the keypad grid rule in AGENTS.md so the mapping is not derived arithmetically again.

Verification

  • dotnet build CxShell.csproj - 0 warnings, 0 errors.
  • dotnet test CxShell.Tests/CxShell.Tests.csproj - 790/790 pass on this branch, including the 14 new numpad-scancode cases.
  • Manual: connect an RDP session and type with the numeric keypad (NumLock on) - digits 1-9 now arrive as digits; toggling NumLock switches the remote between digits and navigation keys, matching mstsc.

The keypad scancode table was derived arithmetically from the Key enum order (0x52 + digit), but only NumPad0 sits at 0x52: digits 1-9 occupy the physical grid 0x47-0x51. NumPad1 was sent as the keypad decimal (0x53) and NumPad5/NumPad6 as F11/F12, which made the numeric keypad unusable in RDP sessions and made local NumLock toggling appear to do nothing.

Route the digits through a new Services/RdpKeyboardScancodes lookup and re-assert the local toggle state through a synchronize event after each NumLock/CapsLock/ScrollLock key-up so the remote LED cannot drift from the local one. Adds RdpKeyboardScancodesTests and documents the keypad grid rule in AGENTS.md.
@xiaochengzjc
xiaochengzjc merged commit 50c7307 into AtomUICommunity:master Nov 29, 2026
1 check passed
xiaochengzjc pushed a commit that referenced this pull request Nov 29, 2026
This reverts commit 50c7307, reversing
changes made to 1cb5a98.
xiaochengzjc pushed a commit that referenced this pull request Nov 29, 2026
Restores the content reverted in 510fa2e. The numeric keypad fix (4ce78f3) is already
on master and identical, so it is unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants