Skip to content

Make input fallback and indicator opt-in; add configurable fullscreen passthrough - #3

Open
ts33kr wants to merge 19 commits into
holgertkey:mainfrom
ts33kr:configurable-input-behavior
Open

ts33kr wants to merge 19 commits into
holgertkey:mainfrom
ts33kr:configurable-input-behavior

Conversation

@ts33kr

@ts33kr ts33kr commented Oct 12, 2026 •

Copy link
Copy Markdown

Caps Lock is currently intercepted in every foreground application, and the Win+Space fallback and periodic Scroll Lock indicator cannot be turned off. This change makes those behaviors configurable so fullscreen applications can receive native Caps Lock input without synthetic Win+Space or Scroll Lock events.

Use case: desktop language switching and fullscreen games

I use Caps Lock for English/Russian language switching on the desktop, while keeping Ukrainian available through Windows' normal language selector. In games such as PUBG and Apex Legends, I need the same physical Caps Lock key for an in-game action. I want to leave CCaps running and move between desktop applications and games without manually pausing it or maintaining a list of game executables.

This is the use case these additions support:

  • Fullscreen passthrough gives fullscreen and borderless fullscreen games the original Caps Lock press and release, while normal desktop windows retain language switching.
  • Disabling the Win+Space fallback keeps language switching from injecting the Windows key. That matters when movement/action keys such as W or R are held: language switching should not introduce a Windows-key shortcut alongside those inputs.
  • Disabling the Scroll Lock indicator avoids unrelated synthetic Scroll Lock input and its periodic polling when the indicator is not needed.

These choices are configurable so people who want the original fallback or indicator, or language switching inside fullscreen applications, can enable that behavior. The modified build worked for desktop language switching and a couple of Apex Legends matches in this setup. PUBG is another motivating use case; this report does not claim a separate PUBG test result.

Configuration and behavior

Adds three fields to the existing JSON configuration:

  • win_space_fallback: false: use only the direct layout-change request unless explicitly enabled.
  • scroll_lock_indicator: false: do not start the indicator timer or generate indicator key events unless explicitly enabled.
  • fullscreen_passthrough: true: pass Caps Lock through when the foreground client area covers its monitor, including borderless fullscreen.

Missing fields in older configurations use these defaults. This intentionally changes the previous default behavior: users wanting the existing fallback and indicator can set both options to true. Applications ignoring direct layout requests require Windows' normal language selector when fallback is off.

Fullscreen detection runs on the first Caps Lock keydown, without a separate watcher or polling timer. Repeats and keyup retain the initial route if focus changes while the key is held. Per-monitor DPI awareness keeps geometry checks consistent on scaled displays. Desktop remapping switches only once per held press.

All execution modes load the feature settings, -enable preserves them when changing languages, and status/foreground diagnostics report them. README and changelog document configuration, startup, English/Russian filtering with Ukrainian available through Win+Space, and gaming limitations.

Validation

  • Windows formatting, clippy (all targets, warnings treated as errors), unit tests, and release build passed: https://github.com/ts33kr/ccaps/actions/runs/38303480923
  • Added tests for legacy configuration, option round-trips/preservation, direct-only switching with zero Win+Space presses, and fullscreen geometry.
  • Manual testing on one Windows installation confirmed normal-window language switching and successful play across several Apex Legends matches using the modified executable.

Fullscreen browsers and video players also receive native Caps Lock input; windowed games are not excluded. The keyboard hook remains loaded, so the Apex observation is not a guarantee of compatibility with every game or future anti-cheat update. No workflow changes are included in this PR.

ts33kr added 19 commits October 12, 2026 22:08
Added optional fields for win_space_fallback and scroll_lock_indicator with default values. Updated tests to validate new configuration options.
…status

Added information about win_space_fallback and scroll_lock_indicator to configuration display. Updated configuration loading and saving mechanism to use mutable config.
Added fullscreen passthrough information to CLI output.
Updated installation instructions to recommend installing from crates.io and changed the repository URL in build steps.
Removed build and artifact upload steps from CI workflow.
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