Skip to content

Gamepad fixes#1274

Draft
sezanzeb wants to merge 48 commits intomainfrom
fix_hat_mapping
Draft

Gamepad fixes#1274
sezanzeb wants to merge 48 commits intomainfrom
fix_hat_mapping

Conversation

@sezanzeb
Copy link
Copy Markdown
Owner

@sezanzeb sezanzeb commented Mar 22, 2026

closes #1152 and #893

Fixes:

  • Mapping a combination onto dpad-right keeps an uncombined dpad-right working now
  • Default deadzone for mapping joysticks to keys (analog_threshold) is 30 now, instead of 1. This makes recording joystick movement a lot easier, because it won't record both ABS_X and ABS_Y all the time for tiny movements
  • If only one direction of a joystick or the dpad was mapped, the other direction was not forwarded
  • When mapping triggers to keys, they are now correctly counted as released when not pressed, instead of a negative joystick direction

Quality:

  • Added mechanism that logs EV_ABS and EV_REL events without flooding the terminal
  • Added test for gamepads with a joystick abs range of 0 to +256 (instead of -32768 to +32768)
  • Handlers are not overwriting event values anymore. They set an attribute instead for on/off ("pressed")
  • Split test_event_pipeline file to multiple with one class per file
  • Comments and cleanup
  • Added more typehints, fixed a few mypy errors
  • Stricter typing for the methods and functions that print the structure of the MappingHandlers

TODO:

  • check if using EV_REL as input still works

Automated tests for the:

  • unmapped direction of a joystick fix
  • dbad combination fix
  • trigger fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stuff broken when mapping gamepads

1 participant