Skip to content

Conversation

@Flamefire
Copy link
Member

This fixes #1583

WinAPI won't emit set the ALT key-pressed member because it needs to check the HIWORD of lparam for KF_ALTDOWN

SDL2 uses only TEXTINPUT events for keydown of letters.

  1. ALT+q or CTRL+z do not produce text input.
  2. ALT+0054 does produce a single char.
  3. However ALT or CTRL and a letter do not produce combined chars.

So use 1. & 3. to trigger input events without duplicate input from TEXTINPUT.

We usually need either a KeyType event with everything else zero/false,
or a char event with some modifiers.
Especially the latter causes a list of consecutive bool params, where an explicit set is more readable.
@Flamefire Flamefire requested a review from Flow86 November 19, 2025 13:05
ALT+q or CTRL+z do not produce text input.
ALT+0054 does produce a single char.
However ALT or CTRL and a letter do not produce combined chars.

So use that to trigger input events.

Fixes Return-To-The-Roots#1583
@Flamefire Flamefire merged commit 8dba0ce into Return-To-The-Roots:master Nov 21, 2025
19 of 20 checks passed
@Flamefire Flamefire deleted the altQ branch November 22, 2025 12:24
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.

Alt+q not working in game anymore

2 participants