Input: Refactor Keyboard Handling To Use Physical Keys #13

Merged
Ghost merged 67 commits from Babib3l/Ryubing:physical-keyboard-refactor into master 2026-05-26 17:54:56 +00:00
Contributor

This PR refactors keyboard handling to use physical key mappings for all gameplay input, ensuring controls remain consistent across different OS keyboard layouts.
I'd like to give out an ENORMOUS thank you to @Neo for his very generous help on getting MacOS caps lock behaviour working, but as well for taking the time for extensive testing, planning and discussions, and finally for writing this PR message :) Keep being awsome pal 👊

New Features :

  • New: Gameplay input now uses physical key positions instead of OS layouts, ensuring the same physical key triggers the same action across keyboard layouts.
    • Key rebinding stores physical keys and config compatibility is preserved, with physical keys now the primary gameplay‑binding format.
    • Physical‑key model is now consistent across platforms, including updated SDL/headless behavior.
  • Added: New Input setting "Reset keybinds to default", with a new confirmation dialog appears when changes are being overwritten.
  • Fractured: Keyboard‑related locales to the newly created KeyboardLayout.json.
    • New input device settings/actions use clearer labels and tooltips.
    • UI Key Labels (such as Left Shift and Right Shift) are more accurate and standardized, with clearer symbols, consistent naming, dynamic learning of printable labels from real key events, and persistence across restarts.

Improvements :

  • Reduced: Incorrect key labels by using observed host symbols instead of language assumptions.
  • Reduced: Stuck/stale keys by using binary pressed‑key tracking, fixing rebinding/gameplay paths, better held‑key recovery after focus changes, and clearing keyboard state when Ryujinx/settings windows lose focus.
  • Improved: Device handling → refreshing no longer clears the selector, disconnect fallback is consistent, reconnect restores controllers automatically, and the UI avoids invalid/empty device states.
  • Improved: Async input‑assignment callbacks are now guarded when switching views/devices, preventing stale callbacks from hitting detached views.
  • Adjusted: Input visualiser to be more robust when switching sources or handling controller disconnect/reconnect, without needing to reopen settings.
  • Improved: Modification (changes to input controls) tracking
    • Rebinding to the same value, reverting to original config, restoring defaults without differences, or reloading equivalent profiles no longer leaves Player marked as modified.
  • Reduced: Keyboard LED noise in logs and added optional UI keyboard‑state/rebinding diagnostics.

Fixes :

  • Special Keys:
    • AltGr and other special keys behave correctly, including proper Ctrl+Alt → AltRight handling and more consistent normalization of special/synthetic keys.
    • Caps Lock is now reliably bindable on all platforms (Windows/Linux register every press; macOS every other).
  • Fixed: Certain cases where keyboard input broke after pointer interactions

Current Limitations

These are planned on being fixed/improved upon in future PRs:

  • Hotkeys still use semantic (Key) mappings.
  • Software keyboard / text input still uses the semantic path
  • Printable key labels may fall back to defaults until observed from host input.
  • Full semantic/physical split currently implemented only in the Avalonia driver.
This PR refactors keyboard handling to use physical key mappings for all gameplay input, ensuring controls remain consistent across different OS keyboard layouts. I'd like to give out an ENORMOUS thank you to @Neo for his very generous help on getting MacOS caps lock behaviour working, but as well for taking the time for extensive testing, planning and discussions, and finally for writing this PR message :) Keep being awsome pal 👊 ### New Features : * **New**: Gameplay input now uses physical key positions instead of OS layouts, ensuring the same physical key triggers the same action across keyboard layouts. * Key rebinding stores physical keys and config compatibility is preserved, with physical keys now the primary gameplay‑binding format. * Physical‑key model is now consistent across platforms, including updated SDL/headless behavior. * **Added**: New Input setting "Reset keybinds to default", with a new confirmation dialog appears when changes are being overwritten. * **Fractured**: Keyboard‑related locales to the newly created `KeyboardLayout.json`. * New input device settings/actions use clearer labels and tooltips. * UI Key Labels (such as Left Shift and Right Shift) are more accurate and standardized, with clearer symbols, consistent naming, dynamic learning of printable labels from real key events, and persistence across restarts. ### Improvements : * **Reduced**: Incorrect key labels by using observed host symbols instead of language assumptions. * **Reduced**: Stuck/stale keys by using binary pressed‑key tracking, fixing rebinding/gameplay paths, better held‑key recovery after focus changes, and clearing keyboard state when Ryujinx/settings windows lose focus. * **Improved**: Device handling → refreshing no longer clears the selector, disconnect fallback is consistent, reconnect restores controllers automatically, and the UI avoids invalid/empty device states. * **Improved**: Async input‑assignment callbacks are now guarded when switching views/devices, preventing stale callbacks from hitting detached views. * **Adjusted**: Input visualiser to be more robust when switching sources or handling controller disconnect/reconnect, without needing to reopen settings. * **Improved**: Modification (changes to input controls) tracking * Rebinding to the same value, reverting to original config, restoring defaults without differences, or reloading equivalent profiles no longer leaves Player marked as modified. * **Reduced**: Keyboard LED noise in logs and added optional UI keyboard‑state/rebinding diagnostics. ### Fixes : * **Special Keys**: * AltGr and other special keys behave correctly, including proper Ctrl+Alt → AltRight handling and more consistent normalization of special/synthetic keys. * Caps Lock is now reliably bindable on all platforms (Windows/Linux register every press; macOS every other). * **Fixed**: Certain cases where keyboard input broke after pointer interactions ### Current Limitations These are planned on being fixed/improved upon in future PRs: * Hotkeys still use semantic (Key) mappings. * Software keyboard / text input still uses the semantic path * Printable key labels may fall back to defaults until observed from host input. * Full semantic/physical split currently implemented only in the Avalonia driver.
Preparing to transfer updated keyboard labels from another MR into this one.
Moves keyboard labels that were updated in the UI input MR, to this MR, due to it fitting the purpose better and to avoid double work.
Reverting the "readability" updates to the locale IDs due to helpful feedback from LotP. If these go get changed, then only in a similar MR.
Merge branch ryujinx:master into keyboard-localisation-fracture-share
Some checks failed
Pull Request Triage / triage (pull_request_target) Successful in 19s
Build PR / linux-arm64 (Debug) (pull_request) Failing after 4s
Build PR / linux-x64 (Debug) (pull_request) Failing after 4s
Build PR / linux-arm64 (Release) (pull_request) Failing after 4s
Build PR / linux-x64 (Release) (pull_request) Failing after 4s
Build PR / macOS Universal (Debug) (pull_request) Failing after 2m10s
Build PR / macOS Universal (Release) (pull_request) Failing after 2m13s
Build PR / pr_build (pull_request) Has been cancelled
Build PR / osx-x64 (Debug) (pull_request) Has been cancelled
Build PR / win-arm64 (Debug) (pull_request) Has been cancelled
Build PR / win-x64 (Debug) (pull_request) Has been cancelled
Build PR / osx-x64 (Release) (pull_request) Has been cancelled
Build PR / win-arm64 (Release) (pull_request) Has been cancelled
Build PR / win-x64 (Release) (pull_request) Has been cancelled
5aab5f205d
Babib3l force-pushed physical-keyboard-refactor from 5aab5f205d
Some checks failed
Pull Request Triage / triage (pull_request_target) Successful in 19s
Build PR / linux-arm64 (Debug) (pull_request) Failing after 4s
Build PR / linux-x64 (Debug) (pull_request) Failing after 4s
Build PR / linux-arm64 (Release) (pull_request) Failing after 4s
Build PR / linux-x64 (Release) (pull_request) Failing after 4s
Build PR / macOS Universal (Debug) (pull_request) Failing after 2m10s
Build PR / macOS Universal (Release) (pull_request) Failing after 2m13s
Build PR / pr_build (pull_request) Has been cancelled
Build PR / osx-x64 (Debug) (pull_request) Has been cancelled
Build PR / win-arm64 (Debug) (pull_request) Has been cancelled
Build PR / win-x64 (Debug) (pull_request) Has been cancelled
Build PR / osx-x64 (Release) (pull_request) Has been cancelled
Build PR / win-arm64 (Release) (pull_request) Has been cancelled
Build PR / win-x64 (Release) (pull_request) Has been cancelled
to 38d49fd7cf
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Failing after 4m46s
Build PR / win-x64 (Release) (pull_request) Failing after 4m47s
Build PR / linux-x64 (Release) (pull_request) Failing after 4m47s
Build PR / macOS Universal (Release) (pull_request) Failing after 5m45s
2026-04-13 21:58:04 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from fdf1e38c8a
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 4m34s
Build PR / win-x64 (Release) (pull_request) Successful in 5m59s
Build PR / linux-x64 (Release) (pull_request) Successful in 6m33s
Build PR / macOS Universal (Release) (pull_request) Successful in 7m39s
to cd93017165
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 4m46s
Build PR / linux-arm64 (Release) (pull_request) Successful in 6m2s
Build PR / linux-x64 (Release) (pull_request) Successful in 10m8s
Build PR / macOS Universal (Release) (pull_request) Successful in 7m52s
2026-04-15 20:40:46 +00:00
Compare
Babib3l changed title from WIP: Input: Refactor Keyboard Handling To Use Physical Keys + General input-related fixes to Input: Refactor Keyboard Handling To Use Physical Keys + General input-related fixes 2026-04-15 21:05:23 +00:00
Babib3l force-pushed physical-keyboard-refactor from 5b9cb52d2e
Some checks failed
Build PR / linux-x64 (Release) (pull_request) Has been cancelled
Build PR / win-x64 (Release) (pull_request) Has been cancelled
Build PR / linux-arm64 (Release) (pull_request) Has been cancelled
Build PR / macOS Universal (Release) (pull_request) Has been cancelled
to 8a1a248303
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 5m52s
Build PR / linux-x64 (Release) (pull_request) Successful in 9m26s
Build PR / linux-arm64 (Release) (pull_request) Successful in 9m43s
Build PR / macOS Universal (Release) (pull_request) Successful in 22m19s
2026-04-16 16:04:39 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from f22f26c516
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Has been cancelled
Build PR / linux-x64 (Release) (pull_request) Has been cancelled
Build PR / win-x64 (Release) (pull_request) Has been cancelled
Build PR / macOS Universal (Release) (pull_request) Has been cancelled
to a47f0fa9e2
Some checks failed
Build PR / macOS Universal (Release) (pull_request) Failing after 4m51s
Build PR / linux-arm64 (Release) (pull_request) Failing after 45m4s
Build PR / win-x64 (Release) (pull_request) Failing after 1m21s
Build PR / linux-x64 (Release) (pull_request) Failing after 1m12s
2026-04-19 10:20:22 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from c8e78b7298
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Failing after 1m25s
Build PR / linux-x64 (Release) (pull_request) Failing after 1m27s
Build PR / win-x64 (Release) (pull_request) Failing after 1m31s
Build PR / macOS Universal (Release) (pull_request) Failing after 2m53s
to 38d49fd7cf
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Failing after 4m46s
Build PR / win-x64 (Release) (pull_request) Failing after 4m47s
Build PR / linux-x64 (Release) (pull_request) Failing after 4m47s
Build PR / macOS Universal (Release) (pull_request) Failing after 5m45s
2026-04-20 11:37:17 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 38d49fd7cf
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Failing after 4m46s
Build PR / win-x64 (Release) (pull_request) Failing after 4m47s
Build PR / linux-x64 (Release) (pull_request) Failing after 4m47s
Build PR / macOS Universal (Release) (pull_request) Failing after 5m45s
to f3474f65e4
Some checks failed
Build PR / linux-x64 (Release) (pull_request) Failing after 4m40s
Build PR / win-x64 (Release) (pull_request) Failing after 4m42s
Build PR / linux-arm64 (Release) (pull_request) Failing after 4m43s
Build PR / macOS Universal (Release) (pull_request) Failing after 6m0s
2026-04-20 14:48:26 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 34ca2e6c81
Some checks failed
Build PR / win-x64 (Release) (pull_request) Failing after 1m11s
Build PR / linux-arm64 (Release) (pull_request) Failing after 1m32s
Build PR / linux-x64 (Release) (pull_request) Failing after 1m40s
Build PR / macOS Universal (Release) (pull_request) Failing after 2m55s
to f22f26c516
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Has been cancelled
Build PR / linux-x64 (Release) (pull_request) Has been cancelled
Build PR / win-x64 (Release) (pull_request) Has been cancelled
Build PR / macOS Universal (Release) (pull_request) Has been cancelled
2026-04-20 15:15:27 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from f22f26c516
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Has been cancelled
Build PR / linux-x64 (Release) (pull_request) Has been cancelled
Build PR / win-x64 (Release) (pull_request) Has been cancelled
Build PR / macOS Universal (Release) (pull_request) Has been cancelled
to ffbf28eb1b
Some checks failed
Build PR / win-x64 (Release) (pull_request) Failing after 1m18s
Build PR / linux-arm64 (Release) (pull_request) Failing after 1m19s
Build PR / linux-x64 (Release) (pull_request) Failing after 1m33s
Build PR / macOS Universal (Release) (pull_request) Failing after 2m57s
2026-04-20 15:16:43 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from b9d02ae5bb
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Failing after 1m28s
Build PR / linux-x64 (Release) (pull_request) Failing after 4m13s
Build PR / win-x64 (Release) (pull_request) Failing after 4m15s
Build PR / macOS Universal (Release) (pull_request) Failing after 6m4s
to af71a60c41
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Failing after 1m12s
Build PR / macOS Universal (Release) (pull_request) Failing after 2m34s
Build PR / linux-x64 (Release) (pull_request) Failing after 3m35s
Build PR / win-x64 (Release) (pull_request) Failing after 3m36s
2026-04-20 22:47:36 +00:00
Compare
Author
Contributor

this MR is now complete, there are no more features to be added, and all bugs that have been reported are fixed 🥳

this MR is now complete, there are no more features to be added, and all bugs that have been reported are fixed 🥳
Babib3l force-pushed physical-keyboard-refactor from 99183d4a93
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 3m28s
Build PR / macOS Universal (Release) (pull_request) Successful in 6m25s
Build PR / win-x64 (Release) (pull_request) Successful in 11m45s
Build PR / linux-x64 (Release) (pull_request) Successful in 13m22s
to 2ba7646ae1
Some checks failed
Build PR / macOS Universal (Release) (pull_request) Successful in 11m34s
Build PR / win-x64 (Release) (pull_request) Failing after 14m21s
Build PR / linux-x64 (Release) (pull_request) Successful in 16m19s
Build PR / linux-arm64 (Release) (pull_request) Failing after 25m50s
2026-04-22 21:52:16 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 2ba7646ae1
Some checks failed
Build PR / macOS Universal (Release) (pull_request) Successful in 11m34s
Build PR / win-x64 (Release) (pull_request) Failing after 14m21s
Build PR / linux-x64 (Release) (pull_request) Successful in 16m19s
Build PR / linux-arm64 (Release) (pull_request) Failing after 25m50s
to 7bb78fec4b
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 5m2s
Build PR / macOS Universal (Release) (pull_request) Successful in 6m43s
Build PR / linux-arm64 (Release) (pull_request) Successful in 10m16s
Build PR / linux-x64 (Release) (pull_request) Successful in 14m13s
2026-04-24 16:08:01 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 7bb78fec4b
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 5m2s
Build PR / macOS Universal (Release) (pull_request) Successful in 6m43s
Build PR / linux-arm64 (Release) (pull_request) Successful in 10m16s
Build PR / linux-x64 (Release) (pull_request) Successful in 14m13s
to c5d460809c
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m12s
Build PR / win-x64 (Release) (pull_request) Successful in 7m34s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m38s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m30s
2026-04-25 10:51:17 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from c5d460809c
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m12s
Build PR / win-x64 (Release) (pull_request) Successful in 7m34s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m38s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m30s
to 9142eb2970
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 6m7s
Build PR / macOS Universal (Release) (pull_request) Successful in 7m59s
Build PR / linux-x64 (Release) (pull_request) Successful in 34m6s
Build PR / linux-arm64 (Release) (pull_request) Successful in 41m42s
2026-04-25 13:08:20 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from e4b3aca925
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m2s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m32s
Build PR / win-x64 (Release) (pull_request) Successful in 7m34s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m44s
to 572585151d
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 15m54s
Build PR / linux-x64 (Release) (pull_request) Successful in 18m44s
Build PR / win-x64 (Release) (pull_request) Successful in 12m16s
Build PR / macOS Universal (Release) (pull_request) Successful in 14m1s
2026-04-27 17:35:50 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 572585151d
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 15m54s
Build PR / linux-x64 (Release) (pull_request) Successful in 18m44s
Build PR / win-x64 (Release) (pull_request) Successful in 12m16s
Build PR / macOS Universal (Release) (pull_request) Successful in 14m1s
to a87f5c4fd3
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 6m29s
Build PR / linux-x64 (Release) (pull_request) Successful in 6m36s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m29s
Build PR / linux-arm64 (Release) (pull_request) Successful in 9m30s
2026-04-28 20:45:27 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from a87f5c4fd3
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 6m29s
Build PR / linux-x64 (Release) (pull_request) Successful in 6m36s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m29s
Build PR / linux-arm64 (Release) (pull_request) Successful in 9m30s
to c1ea970fec
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 4m40s
Build PR / linux-x64 (Release) (pull_request) Successful in 5m7s
Build PR / win-x64 (Release) (pull_request) Successful in 4m51s
Build PR / macOS Universal (Release) (pull_request) Successful in 12m5s
2026-04-30 12:08:56 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from c1ea970fec
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 4m40s
Build PR / linux-x64 (Release) (pull_request) Successful in 5m7s
Build PR / win-x64 (Release) (pull_request) Successful in 4m51s
Build PR / macOS Universal (Release) (pull_request) Successful in 12m5s
to 8f181a7f8e
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 6m5s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m40s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m34s
Build PR / linux-arm64 (Release) (pull_request) Successful in 12m28s
2026-05-02 13:00:56 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 8f181a7f8e
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 6m5s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m40s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m34s
Build PR / linux-arm64 (Release) (pull_request) Successful in 12m28s
to 166bf1c29f
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 6m4s
Build PR / win-x64 (Release) (pull_request) Successful in 9m1s
Build PR / macOS Universal (Release) (pull_request) Successful in 9m38s
Build PR / linux-x64 (Release) (pull_request) Successful in 9m55s
2026-05-02 22:41:05 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 166bf1c29f
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 6m4s
Build PR / win-x64 (Release) (pull_request) Successful in 9m1s
Build PR / macOS Universal (Release) (pull_request) Successful in 9m38s
Build PR / linux-x64 (Release) (pull_request) Successful in 9m55s
to 81c5a3f76a
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 7m44s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m3s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m11s
Build PR / linux-arm64 (Release) (pull_request) Successful in 9m11s
2026-05-05 01:03:36 +00:00
Compare
Ghost added this to the 1.4.0 milestone 2026-05-09 13:19:43 +00:00
Babib3l changed title from Input: Refactor Keyboard Handling To Use Physical Keys + General input-related fixes to Input: Refactor Keyboard Handling To Use Physical Keys 2026-05-09 19:24:11 +00:00
Babib3l force-pushed physical-keyboard-refactor from 81c5a3f76a
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 7m44s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m3s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m11s
Build PR / linux-arm64 (Release) (pull_request) Successful in 9m11s
to 4699d4a4fa
Some checks failed
Build PR / linux-arm64 (Release) (pull_request_target) Failing after 6m55s
Build PR / win-x64 (Release) (pull_request_target) Successful in 7m46s
Build PR / macOS Universal (Release) (pull_request_target) Successful in 7m56s
Build PR / linux-x64 (Release) (pull_request_target) Successful in 7m59s
Build PR / Post comment linking uploaded artifacts (pull_request_target) Has been skipped
2026-05-09 19:34:44 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 2b37da884d
All checks were successful
Build PR / linux-arm64 (Release) (pull_request_target) Successful in 5m5s
Build PR / macOS Universal (Release) (pull_request_target) Successful in 8m21s
Build PR / win-x64 (Release) (pull_request_target) Successful in 8m49s
Build PR / linux-x64 (Release) (pull_request_target) Successful in 8m57s
Build PR / Post comment linking uploaded artifacts (pull_request_target) Successful in 5s
to c2eda68f30
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m17s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m40s
Build PR / win-x64 (Release) (pull_request) Successful in 8m25s
Build PR / macOS Universal (Release) (pull_request) Failing after 10m2s
2026-05-11 00:03:40 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from c2eda68f30
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m17s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m40s
Build PR / win-x64 (Release) (pull_request) Successful in 8m25s
Build PR / macOS Universal (Release) (pull_request) Failing after 10m2s
to d63fb23a2c
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 7m46s
Build PR / macOS Universal (Release) (pull_request) Successful in 7m58s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m4s
Build PR / linux-arm64 (Release) (pull_request) Successful in 8m35s
2026-05-12 21:32:02 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from d63fb23a2c
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 7m46s
Build PR / macOS Universal (Release) (pull_request) Successful in 7m58s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m4s
Build PR / linux-arm64 (Release) (pull_request) Successful in 8m35s
to 10cea611c4
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m40s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m41s
Build PR / win-x64 (Release) (pull_request) Successful in 7m27s
Build PR / macOS Universal (Release) (pull_request) Failing after 10m18s
2026-05-15 10:14:14 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 10cea611c4
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m40s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m41s
Build PR / win-x64 (Release) (pull_request) Successful in 7m27s
Build PR / macOS Universal (Release) (pull_request) Failing after 10m18s
to d2ceda5416
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m17s
Build PR / linux-x64 (Release) (pull_request) Successful in 9m39s
Build PR / win-x64 (Release) (pull_request) Successful in 8m28s
Build PR / macOS Universal (Release) (pull_request) Successful in 9m4s
2026-05-16 01:27:39 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from d2ceda5416
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m17s
Build PR / linux-x64 (Release) (pull_request) Successful in 9m39s
Build PR / win-x64 (Release) (pull_request) Successful in 8m28s
Build PR / macOS Universal (Release) (pull_request) Successful in 9m4s
to 548bb230dc
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m9s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m14s
Build PR / macOS Universal (Release) (pull_request) Successful in 6m41s
Build PR / win-x64 (Release) (pull_request) Successful in 10m58s
2026-05-16 14:55:19 +00:00
Compare
Ghost left a comment

A couple of things need to be changed before merge, and you need to sync your PR with master to resolve some conflicts that have cropped up.

A couple of things need to be changed before merge, and you need to sync your PR with master to resolve some conflicts that have cropped up.
@ -22,0 +40,4 @@
{
string source = buttonFromState is not null ? "state" : "buffered-press";
Logger.Debug?.Print(LogClass.UI, $"Keyboard assigner registered key={_pressedButton.Value.AsHidType<Key>()}, source={source}, cancelPressed={ShouldCancel()}");
}

You have two of the same check here. I propose this instead:

if (_pressedButton is null)
{
    Button? buttonFromState = GetPressedButtonFromState();
    Button? buttonFromBufferedPress = buttonFromState is null ? GetPressedButtonFromBufferedPress() : null;
	
    _pressedButton = buttonFromState ?? buttonFromBufferedPress;
}
if (_pressedButton is not null)
{
    string source = buttonFromState is not null ? "state" : "buffered-press";
    Logger.Debug?.Print(LogClass.UI, $"Keyboard assigner registered key={_pressedButton.Value.AsHidType<Key>()}, source={source}, cancelPressed={ShouldCancel()}");
}

Though I think you can get away with not having the second check? It's worth considering taking another look at this method, there's probably something you can do here.

You have two of the same check here. I propose this instead: ```cs if (_pressedButton is null) { Button? buttonFromState = GetPressedButtonFromState(); Button? buttonFromBufferedPress = buttonFromState is null ? GetPressedButtonFromBufferedPress() : null; _pressedButton = buttonFromState ?? buttonFromBufferedPress; } if (_pressedButton is not null) { string source = buttonFromState is not null ? "state" : "buffered-press"; Logger.Debug?.Print(LogClass.UI, $"Keyboard assigner registered key={_pressedButton.Value.AsHidType<Key>()}, source={source}, cancelPressed={ShouldCancel()}"); } ``` Though I think you can get away with not having the second check? It's worth considering taking another look at this method, there's probably *something* you can do here.
Author
Contributor

I've refactored it to consolidate into two clear conditions : first initialise the button if null, then log if it's now set, which eliminates the duplicate check and makes the logic more readable.
commit b1ce9d62280db6a316b0922bc335bff99d90d9af

I've refactored it to consolidate into two clear conditions : first initialise the button if null, then log if it's now set, which eliminates the duplicate check and makes the logic more readable. commit b1ce9d62280db6a316b0922bc335bff99d90d9af
Babib3l marked this conversation as resolved
@ -97,0 +181,4 @@
{
if (OperatingSystem.IsMacOS())
{
var flags = CGEventSourceFlagsState(CGEventSourceStateID.HIDSystemState);

Please change this to not use var.

Please change this to not use ``var``.
Babib3l marked this conversation as resolved
@ -97,0 +195,4 @@
}
catch
{
// ignore and fallback to "not pressed"

Not a good idea to swallow errors. I would recommend using UI debug logs here to note the "issue" and exception before moving forward.

Not a good idea to swallow errors. I would recommend using UI debug logs here to note the "issue" and exception before moving forward.
Author
Contributor

commit d32b1b3088cafb6d7c63744293904a92abbb848e

commit d32b1b3088cafb6d7c63744293904a92abbb848e
Babib3l marked this conversation as resolved
@ -150,0 +287,4 @@
AvaPhysicalKey.Backslash,
// NOTE: invalid
AvaPhysicalKey.None

You have several repeating AvaPhysicalKey.none listed here, and only some are invalid? Why is that?

You have several repeating ``AvaPhysicalKey.none`` listed here, and only some are invalid? Why is that?
Author
Contributor

The AvaPhysicalKey.None entries are just placeholders in the mapping array for Avalonia.Input.Key values that don’t have a corresponding physical key mapping.
Only the first/last None are explicitly marked as invalid sentinel values; the intermediate ones are simply unmapped gaps because Key is not contiguous and some keys have no direct physical equivalent

The `AvaPhysicalKey.None` entries are just placeholders in the mapping array for `Avalonia.Input.Key` values that don’t have a corresponding physical key mapping. Only the first/last `None` are explicitly marked as invalid sentinel values; the intermediate ones are simply unmapped gaps because `Key` is not contiguous and some keys have no direct physical equivalent
Ghost marked this conversation as resolved
@ -0,0 +124,4 @@
_observedLayoutLabelsLoaded = true;
}
}

EnsureObservedLayoutLabelsLoaded() needs to be rewritten. We want to avoid nesting and swallowing errors.

``EnsureObservedLayoutLabelsLoaded()`` needs to be rewritten. We want to avoid nesting and swallowing errors.
Babib3l marked this conversation as resolved
@ -0,0 +143,4 @@
}
catch
{
}

See above.

See above.
Babib3l marked this conversation as resolved
@ -218,1 +235,4 @@
}
catch (NotSupportedException)
{
}

See above.

See above.
Babib3l marked this conversation as resolved
@ -285,0 +338,4 @@
int deviceIndex = -1;
for (int i = 0; i < Devices.Count; i++)
{
var device = Devices[i];

Please change this to not use var.

Please change this to not use ``var``.
Babib3l marked this conversation as resolved
@ -535,0 +820,4 @@
{
// Avalonia bug: setting a newly instanced ComboBox to 0
// causes the selected item to show up blank
// Workaround: set the box to 1 and then 0

I understand that you're refactoring here: please document the issue with a link to information on the issue if and when applicable.

Could be one of these (or another):
https://github.com/AvaloniaUI/Avalonia/issues/4610
https://github.com/AvaloniaUI/Avalonia/discussions/18834

I understand that you're refactoring here: please document the issue with a link to information on the issue if and when applicable. Could be one of these (or another): https://github.com/AvaloniaUI/Avalonia/issues/4610 https://github.com/AvaloniaUI/Avalonia/discussions/18834
Babib3l marked this conversation as resolved
@ -614,0 +909,4 @@
selectedDeviceIndex = -1;
for (int i = 0; i < Devices.Count; i++)
{
var device = Devices[i];

Please change this to not use var.

Please change this to not use ``var``.
Babib3l marked this conversation as resolved
@ -723,3 +989,3 @@
else if (activeDevice.Type == DeviceType.Controller)
{
bool isNintendoStyle = Devices.ToList().FirstOrDefault(x => x.Id == activeDevice.Id).Name.Contains("Nintendo");
bool isNintendoStyle = activeDevice.Name.Contains("Nintendo");

I wonder if the SDL driver is active at this point? Might make more sense to check the vendor ID of the device.

I wonder if the SDL driver is active at this point? Might make more sense to check the vendor ID of the device.
Author
Contributor

commit 8ec4d5821bc1d7bcd304e92633fafc7b15f0b3ca

commit 8ec4d5821bc1d7bcd304e92633fafc7b15f0b3ca
Babib3l marked this conversation as resolved
@ -15,0 +43,4 @@
return;
}
var mainWindow = RyujinxApp.MainWindow;

Please change this to not use var.

Please change this to not use ``var``.
Babib3l marked this conversation as resolved
Babib3l force-pushed physical-keyboard-refactor from 548bb230dc
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 5m9s
Build PR / linux-x64 (Release) (pull_request) Successful in 7m14s
Build PR / macOS Universal (Release) (pull_request) Successful in 6m41s
Build PR / win-x64 (Release) (pull_request) Successful in 10m58s
to cf3b6b29a9
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 8m36s
Build PR / win-arm64 (Release) (pull_request) Successful in 9m28s
Build PR / win-x64 (Release) (pull_request) Successful in 9m41s
Build PR / macOS Universal (Release) (pull_request) Successful in 9m53s
Build PR / linux-x64 (Release) (pull_request) Successful in 9m55s
2026-05-24 13:37:08 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from a83cf80844
Some checks failed
Build PR / win-arm64 (Release) (pull_request) Failing after 3m21s
Build PR / win-x64 (Release) (pull_request) Failing after 3m25s
Build PR / linux-x64 (Release) (pull_request) Failing after 3m27s
Build PR / linux-arm64 (Release) (pull_request) Failing after 4m18s
Build PR / macOS Universal (Release) (pull_request) Failing after 5m17s
to 18be83cee1
Some checks failed
Build PR / linux-arm64 (Release) (pull_request) Failing after 49s
Build PR / linux-x64 (Release) (pull_request) Failing after 3m15s
Build PR / win-x64 (Release) (pull_request) Failing after 3m18s
Build PR / win-arm64 (Release) (pull_request) Failing after 3m20s
Build PR / macOS Universal (Release) (pull_request) Failing after 5m9s
2026-05-24 15:10:26 +00:00
Compare
Babib3l force-pushed physical-keyboard-refactor from 8ec4d5821b
All checks were successful
Build PR / linux-arm64 (Release) (pull_request) Successful in 7m5s
Build PR / win-arm64 (Release) (pull_request) Successful in 8m23s
Build PR / win-x64 (Release) (pull_request) Successful in 8m26s
Build PR / macOS Universal (Release) (pull_request) Successful in 8m50s
Build PR / linux-x64 (Release) (pull_request) Successful in 5m51s
to cf27290dc4
Some checks failed
Build PR / win-x64 (Release) (pull_request) Has been cancelled
Build PR / macOS Universal (Release) (pull_request) Has been cancelled
Build PR / linux-arm64 (Release) (pull_request) Has been cancelled
Build PR / linux-x64 (Release) (pull_request) Has been cancelled
Build PR / win-arm64 (Release) (pull_request) Has been cancelled
2026-05-26 06:58:36 +00:00
Compare
Update Headless with Nintendo controller detection
All checks were successful
Build PR / win-x64 (Release) (pull_request) Successful in 8m25s
Build PR / win-arm64 (Release) (pull_request) Successful in 8m30s
Build PR / linux-x64 (Release) (pull_request) Successful in 8m47s
Build PR / linux-arm64 (Release) (pull_request) Successful in 3m18s
Build PR / macOS Universal (Release) (pull_request) Successful in 6m36s
b9ad3d3242
Ghost merged commit fb7c1fde11 into master 2026-05-26 17:54:56 +00:00
Ghost deleted branch physical-keyboard-refactor 2026-05-26 17:54:56 +00:00
Ghost referenced this pull request from a commit 2026-05-30 20:27:47 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
projects/Ryubing!13
No description provided.