Skip to content

fix: sync Num Lock for keypad keys in the built-in RDP engine - #41

Merged
LukeGus merged 1 commit into
Termix-SSH:dev-1.4.2from
ZacharyZcR:fix/keypad-num-lock
Nov 16, 2026
Merged

LukeGus merged 1 commit into
Termix-SSH:dev-1.4.2from
ZacharyZcR:fix/keypad-num-lock

Conversation

@ZacharyZcR

Copy link
Copy Markdown
Member

A user on Windows 11 / Server 2025 x64 reported that keypad digits do not type in RDP sessions even with Num Lock on.

The built-in engine sends sync_locks(false, false, false) on connect and never syncs the locks again. The server reads a keypad scancode by its own Num Lock, so with Num Lock on locally, KP_1 (scancode 0x4F) arrived as End.

The keyboard now tracks the server's lock state and, like guacd's keymap lock requirements, sets Num Lock to what a keypad keysym means before sending it: on for digits, the decimal point and separator, and off for the keypad navigation keys. Pressing Num Lock in the session updates the tracked state. A reconnect restores the tracked state instead of clearing it, and Caps Lock is carried along in every sync. guacd mode is unchanged.

Validation: three new keyboard tests fail before the change and pass after it. All 564 tests (1 skipped), typecheck, build, manifest validation and formatting passed. Not yet checked by hand against a live Windows host.

@termix-triage-bot

termix-triage-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

AI review | Looks safe to merge

The PR fixes keypad digit input in RDP sessions by tracking and syncing the server's Num Lock state before sending keypad keys. The implementation is isolated, includes passing tests, and introduces no security or stability risks.

Reviewed 1f5e2a0. AI can be wrong, a maintainer still decides. Comment /termix review to run it again.

@ZacharyZcR
ZacharyZcR changed the base branch from main to dev-1.4.1 November 15, 2026 19:28
@termix-ci
termix-ci Bot deleted the branch Termix-SSH:dev-1.4.1 November 15, 2026 19:35
The engine turned the server's Num Lock off on connect and never synced it
again. The server reads a keypad scancode by its own Num Lock, so with Num
Lock on locally the keypad digits arrived as navigation keys and typed no
numbers.

Track the server's lock state and, like guacd, set Num Lock to what a keypad
keysym means before sending it: on for digits and the decimal point, off for
the keypad navigation keys. A reconnect restores the tracked state instead of
clearing it.
@ZacharyZcR
ZacharyZcR changed the base branch from dev-1.4.1 to dev-1.4.2 November 16, 2026 13:24

@LukeGus LukeGus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@LukeGus
LukeGus merged commit 646849c into Termix-SSH:dev-1.4.2 Nov 16, 2026
4 checks passed
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