keyboardToPadsLauncher fails to find custom yaml file because leading zeros on vid and pid are omitted

Open Beginner friendly
#16,092 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
shell
Domain
tooling

Research direction

Start by reading the keyboardToPadsLauncher entry point and follow how it gets the vendor and product IDs from evtest. Compare those values with the zero-padded IDs in the custom YAML filename shown in the issue. Run keyboardToPadsLauncher /dev/input/event6 checkconfig to verify it checks the expected p0035 path and finds the mapping.

Written by the indexing model from the issue text.

Description

Batocera build version

43 2026/04/29 20:12

Your architecture

X86_64

Your Graphic Processor Unit(s) (GPU)

AMD Radeon Vega 3

Issue description

/usr/bin/keyboardToPadsLauncher fails to find custom yaml file because leading zeros on vid and pid are omitted.
keyboardToPads settings thus fail to take effect.

Detailed reproduction steps
  • Obtain GP-Wiz40 encoder with VID fafa and PID 0035.
  • Determine the safe_name from keyboardToPads: /userdata/system/configs/keyboardToPads/inputs/GGGGPWiz40.vfafa.p0035.yml
  • Create custom yaml mapping
  • Reboot
  • At this point the error occurs. Mapping is not active.
Details of any attempts to fix this yourself
  • When I run keyboardToPadsLauncher /dev/input/event6 I do not see the extra devices.
  • When I run keyboardToPads --input /dev/input/by-id/usb-GGG_GP-Wiz40-event-joystick --run --config /userdata/system/configs/keyboardToPads/inputs/GGGGPWiz40.vfafa.p0035.yml then I DO see the new devices.
  • Edit /etc/udev/rules.d/99-keyboardtopads.rules to add the ID_INPUT_KEYBOARDTOPADS property to this device:
# GP-Wiz40
SUBSYSTEM=="input", KERNEL=="event*", ACTION=="add", ATTRS{name}=="GGG GP-Wiz40", ENV{ID_INPUT_KEYBOARDTOPADS}="1", RUN+="/usr/bin/keyboardToPadsLauncher $env{DEVNAME} run"
  • Save the filesystem "overlay" using batocera-save-overlay
  • Reboot, still no devices.
  • Run keyboardToPadsLauncher /dev/input/event6 checkconfig
    Device GGG GP-Wiz40 / vendor id: fafa / product id: 35
    checking /userdata/system/configs/keyboardToPads/inputs/GGGGPWiz40.vfafa.p35.yml...
    checking /usr/share/keyboardToPads/inputs/GGGGPWiz40.vfafa.p35.yml...
    No config file found.
  • keyboardToPadsLauncher should be looking for p0035, not p35.
  • Modified keyboardToPadsLauncher to format with leading zeros:
    PHYSVID=$( evtest --info "${PHYSDEV}" | grep -E '^Input device ID:' | sed -e s+"^Input device ID: bus.vendor 0x([a-f0-9]) product .$"+"\1"+ | **sed -e s+'^'+'0000'+ -e s+'.(....)$'+'\1'+)**
    PHYSPID=$( evtest --info "${PHYSDEV}" | grep -E '^Input device ID:' | sed -e s+"^Input device ID: bus.product 0x([a-f0-9]) version .$"+"\1"+ | **sed -e s+'^'+'0000'+ -e s+'.(....)$'+'\1'+)**

This worked.

Details of any modifications you have made to Batocera.

Edit keyboardToPadsLauncher to format vid and pid with leading zeros to match keyboardToPads.

Logs and data

Not sure what would be useful here.

Dominant language
Python
Stars
3.2k
Forks
748
Avg merge
9h 51m
Merged PRs (30d)
170

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from batocera-linux/batocera.linux

All issues in batocera-linux/batocera.linux

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.