Phantom key bindings when changing focus to RetroArch
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.1k
- Forks
- 2.2k
- Avg merge
- 7h 35m
- Merged PRs (30d)
- 51
Description
Description
When I switch focus to retroarch on Linux+X11, the key that was used to switch the focus to will be registered as a key press.
This happens in multiple cases:
- when changing to the workspace where RetroArch is
- when using Alt+Tab to change the focus to RetroArch
- maybe other cases
Steps to reproduce the bug
This is for case 1 (see above)
- Start Linux with X11 and e.g. KDE
- Bind a key binding "Win+F4" to the action "Switch to workspace 4"
- Go to workspace 4 and start RetroArch there
- Go to workspace 1
- Press Win+F4 to go to workspace 4
Expected behavior
This should open workspace 4 without triggering any action inside RetroArch
Actual behavior
RetroArch will register a F4 key press, triggering a quickload of the current savegame, erasing the current state of the game.
The same happens when I bind the Tab key to e.g. "Fast Forward (toggle)" and then press Alt+Tab to focus RetroArch: It will trigger the "Fast Forward (toggle)" action unintentionally.
I realize that this is almost "normal" in gaming software, but it should not be. Depending on the exact key bindings of the user, it can trigger all kinds of unintentional actions. This is seriously bad, and I believe we can do better than this.
Version/Commit
- RetroArch: 1.18.0
- Git Version: 06fa5325f8
Environment information
- OS: ArchLinux with X11 and KDE+i3wm
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the focus-switching cases on Linux with X11, KDE, or i3wm using the Win+F4 and Alt+Tab bindings described in the issue. Trace the input and focus handling to determine where the switching key becomes a RetroArch press; done means changing focus no longer triggers the corresponding in-game action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100