Make input configuration more device-aware

Open
#535 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
lua
Domain
game-dev

Research direction

Start by tracing how the existing key configuration assigns devices and handles gamepads, keyboards, and local multiplayer. The issue proposes device-specific configurations, keyboard exemptions, and restrictions for custom multi-device setups, but names no files, tests, or entry points. Done means those rules are implemented while preserving the stated multi-device use cases.

Written by the indexing model from the issue text.

Description

Client-side enhancement priority: 1 - middle

At the moment, if you connect two controllers, you have to configure both controllers individually in the key config to effectively gain 2 usable key configurations even if the controllers are the same (have the same GUID, should work with the same configuration but don't).

Applying input configurations by device instead of binding one or multiple devices to a single input configuration has various advantages:

  • For anything detected as a gamepad we can just apply the gamepad configuration straight up.
  • For gamepads, you no longer have the issue of only having stick OR dpad available.
  • configuration setups that don't make sense are no longer possible, e.g. binding from several devices or having the same input bound to multiple input configurations in local multiplayer
    • this includes making it more difficult to brick your input config to the degree that you have to delete the configuration file to start over.
  • Once per-keyboard inputs are available, people are almost immediately able to use the same keys on different keyboards

Keyboard inputs should initially be exempt from this to allow people in local vs to work together to set up a configuration with no friction until the aforementioned per-keyboard inputs become available.

Obvious disadvantage is that you couldn't use legitimate multi-device configurations, e.g. foot pedal + joystick or other complementary input devices.
But all things considered these could still be made available with the current mechanics under the following restrictions:

  • a device used in one custom configuration cannot be used in other special configurations
  • a device used in a custom configuration cannot be used as its own main device anymore
Dominant language
Lua
Stars
30
Forks
20
Avg merge
3d 15h
Merged PRs (30d)
17

Getting set up

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 panel-attack/panel-game

All issues in panel-attack/panel-game

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.