libretro / libretro/RetroArch

[udev input] add character and keyboard modifier information to input_keyboard_event()

Open
#12,982 0 comments 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

This issue follows directly from the work the @jdgleaver did on PR https://github.com/libretro/RetroArch/pull/12981. I hope he'll forgive me for copying directly from the notes on that PR in order to make it easier to keep up with the remaining work.

Issue

  • Whenever RetroArch is run under X11, keyboard events are handled (i.e. input_keyboard_event() is called) in x11_common:x11_check_window(). When the udev input driver is used, keyboard events are also handled in the driver itself.
  • With jdgleaver's commit in today's build, calls to input_keyboard_event() are suppressed whenever an x11-based context driver is active (i.e. whenever x11_common:x11_check_window() is being called)
  • The proper solution is to suppress input_keyboard_event() calls in x11_common:x11_check_window() whenever the udev is active - however, this would require the udev driver to be fleshed out such that the missing 'character' and 'modifier' values can be determined. The 'modifier' is easy enough, but I can find no useable reference material for converting a udev keycode into a localised Unicode/UTF-8 representation.

TODO

  • Suppress input_keyboard_event() calls in x11_common:x11_check_window() whenever the udev input driver is active. This would require the udev driver to be fleshed out such that the missing 'character' and 'modifier' values can be determined.

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 by tracing keyboard handling through the udev input driver and x11_common:x11_check_window(), focusing on the existing input_keyboard_event() calls. Determine how the udev path can provide character and modifier values, then suppress the X11 call when udev is active and verify that input_keyboard_event() receives the missing information.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.