Skip to content

fix(input): add missing default value for key_rightalt_to_key_win - #5519

Open
AliceJump wants to merge 2 commits into
LizardByte:masterfrom
AliceJump:fix/native-pen-touch-default-master
Open

fix(input): add missing default value for key_rightalt_to_key_win#5519
AliceJump wants to merge 2 commits into
LizardByte:masterfrom
AliceJump:fix/native-pen-touch-default-master

Conversation

@AliceJump

@AliceJump AliceJump commented Aug 18, 2026

Copy link
Copy Markdown

Description

Fixes a regression where touch/pen input is disabled when native_pen_touch is
omitted from the config file.

Root cause: the input_t aggregate initializer in src/config.cpp is missing
an entry for key_rightalt_to_key_win. This shifts every subsequent field by
one, so native_pen_touch (the final member) is value-initialized to false
instead of its intended default of true. The surrounding comment
true, // native pen/touch support is misleading because that value actually
initializes high_resolution_scrolling.

This change adds the missing initializer (key_rightalt_to_key_win defaults to
false, matching its configured default) and adds unit tests covering both
defaults.

Verified locally: with native_pen_touch absent from sunshine.conf, I ran the
released build (2026.808.164219) and confirmed touch/pen input was broken,
then rebuilt from this branch and confirmed touch/pen input works. The
ConfigInputTest cases pass.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

The input_t aggregate initializer in config.cpp omits the
key_rightalt_to_key_win member, so every subsequent field is shifted and
native_pen_touch (the final member) is value-initialized to false instead
of its intended default of true. As a result, when native_pen_touch is
absent from the config file, pen/touch input is disabled even though the
surrounding comment suggests it defaults to enabled.

Add the missing initializer and add a unit test asserting the default.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 129bb05d96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config.cpp Outdated
Correct the initializer added in the previous commit to use false, matching
the documented and configured default (apply_config resets it to false before
reading the option). Using true would make aggregate-default consumers (tests,
helpers) treat Right Alt as the Windows-key mapping before config parsing.
Extend the default test to cover the inserted member.
@ReenigneArcher ReenigneArcher added the ai PR has signs of heavy ai usage (either indicated by user or assumed) label Aug 18, 2026
@ReenigneArcher

Copy link
Copy Markdown
Member

Thank you for the PR submission, but it looks like you used AI to create this PR.

Please read and follow our Contributing guidelines and specifically our AI Usage policy.

Additionally, please update the PR to use the correct template. You can find it at https://github.com/LizardByte/.github/blob/master/.github/pull_request_template.md?plain=1

@sonarqubecloud

Copy link
Copy Markdown

@AliceJump

Copy link
Copy Markdown
Author

Thank you for the correction. I have updated the PR description to use the correct template and declared the AI usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai PR has signs of heavy ai usage (either indicated by user or assumed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Touch/pen input disabled when native_pen_touch omitted from config (v2026.808 regression)

2 participants