libretro / libretro/RetroArch

[Linux, udev input] Keypresses send double conflicting key events

Open
#12,980 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug: udev platform: linux
Dominant language
C
Stars
14.1k
Forks
2.2k
Avg merge
7h 35m
Merged PRs (30d)
51

Description

Description

When using the udev input driver, keypresses will send both X11 and udev events. This was originally spotted by attempting to bind a hotkey to L, which bound as C, but then triggered the hotkey by pressing C rather than L. Duplicate events were discovered by @sonninnos, issue was requested by @markwkidd.

Expected behavior

The udev driver only sends udev events, correctly aligned with keys on the keyboard.

Actual behavior

Any keypress will send both udev and X11 events, resulting in mis-bound keys and bad inputs in keyboard-based cores.

Steps to reproduce the bug
  1. Change input driver to udev.
  2. Select a keyboard-based core (such as any vice variant) and start the core.
  3. Enable game focus (to remove hotkeys from the equation) and attempt to type. Which of two keys is represented by the core will vary for each key, sometimes switching randomly between presses.
Version/Commit
  • RetroArch: 1.9.9 b5138b6122
Environment information
  • OS: Linux Mint 19.3 x86_64, kernel 5.4.0-81
  • Compiler: gcc 11.1.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with RetroArch's Linux udev input-driver path and reproduce the issue using the listed steps: select udev, launch a keyboard-based core such as a VICE variant, enable game focus, and type. Compare the udev and X11 events; done means keypresses produce only correctly aligned udev events without duplicate or conflicting inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
frontend, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.