Skip to content

Fix regional keyboard input (German and other layouts)#477

Merged
zortos293 merged 2 commits into
devfrom
cursor/34346b3b
May 28, 2026
Merged

Fix regional keyboard input (German and other layouts)#477
zortos293 merged 2 commits into
devfrom
cursor/34346b3b

Conversation

@zortos293
Copy link
Copy Markdown
Collaborator

Summary

Fixes incorrect and missing keys when using non-US keyboard layouts (e.g. German QWERTZ with English in-game language), as reported in #330.

Aligns OpenNOW keyboard handling with the official GFN web client:

  • Send layout-aware virtual keys from event.keyCode instead of US physical event.code
  • Send scancode: 0 on live key events (official client does not forward set-1 scancodes)
  • Match per-key modifier encoding (yS) and sync Caps/Num/Scroll via lock-key packet (type 19)
  • Lock fullscreen keys intercepted by the browser (KeyT, KeyN, etc.) so shortcuts reach the stream

Closes #330

Test plan

  • Set keyboard layout to German (de-DE) in OpenNOW settings
  • Stream a session and verify n, T, ö, ü, +, #, and related keys type correctly
  • Repeat on web and native streamer modes
  • Confirm Escape still works to exit pointer lock / overlay

Made with Cursor

@capy-ai
Copy link
Copy Markdown
Contributor

capy-ai Bot commented May 26, 2026

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@zortos293 zortos293 changed the base branch from main to dev May 26, 2026 21:42
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

const keyCode = event.keyCode;
if (Number.isInteger(keyCode) && keyCode > 0 && keyCode !== 229) {
return keyCode;

P1 Badge Preserve side-specific modifier VK mapping

Route KeyboardEvent values through virtualKeyFromKeyCode() before returning, instead of returning raw event.keyCode immediately. In Chromium/Electron, right-side modifiers commonly report generic keyCodes (e.g. ShiftRight as 16), so this early return drops the existing event.code-based mapping to VK_RSHIFT/VK_RCONTROL/VK_RMENU and collapses left/right modifier identity. That can break shortcuts and AltGr-dependent input paths on non-US layouts.


"tagline": "Open-Source-Cloud-Gaming-Client",
"description": "Cloud-Gaming, Open Source.",

P1 Badge Keep generated locale files out of feature commits

Revert manual edits to non-English locale outputs in this feature change. Per /workspace/OpenNOW/AGENTS.md, only locales/en.json is the source of truth and other locales/*.json files are Crowdin-generated; changing them here creates translation drift and noisy overwrite/conflict risk on the next Crowdin sync, which hurts maintainability and release reliability.

ℹ️ 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".

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@zortos293
Copy link
Copy Markdown
Collaborator Author

@chatgpt-codex-connector check this

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

@zortos293 zortos293 merged commit 1efd879 into dev May 28, 2026
15 checks passed
@zortos293 zortos293 deleted the cursor/34346b3b branch May 28, 2026 08:00
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.

lower case N and capital T still not working

1 participant