Skip to content

feat(windows): server-side key anchoring#167

Open
stefanverleysen wants to merge 1 commit intosymless:masterfrom
stefanverleysen:feat/server-key-anchoring
Open

feat(windows): server-side key anchoring#167
stefanverleysen wants to merge 1 commit intosymless:masterfrom
stefanverleysen:feat/server-key-anchoring

Conversation

@stefanverleysen
Copy link

Summary

  • Adds per-screen anchoredKeys option so specific keys stay on the server instead of being sent to clients
  • Supports single keys (F13, Delete) and modifier combos (Alt+Tab, Ctrl+A)
  • Combos use a pending-modifier approach so a modifier like Alt is held until the next key determines whether the combo should stay on the server or pass through

Changes

  • Added anchoredKeys option to screen config (256-bit VK bitmask plus combo slots)
  • Low-level keyboard hook intercepts anchored keys and combos before relay
  • Config parsing and serialization for the anchoredKeys directive
  • GUI text field added to the screen settings dialog
  • Implemented server-side only so it works with any client platform

To test

  1. Set up a Windows server with at least one client
  2. Open screen settings for the server screen
  3. Enter Alt+Tab in the "Anchored keys" field
  4. Move the cursor to a client so focus switches
  5. Press Alt+Tab. The server should switch windows instead of the client
  6. Test single keys as well (for example F13). These should remain on the server

Per-screen anchoredKeys option keeps specified keys and combos local
on the server instead of relaying them to clients. Supports single
keys (F13, Delete), modifier combos (Alt+Tab, Ctrl+A), and arbitrary
VK codes via a 256-bit bitmask. Combos use a pending-modifier
mechanism that holds modifier keys until the next keypress determines
whether to anchor locally or flush to the client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant