Draft: Add new gamepad KCM
This is a draft for the new gamepad KCM. It's a WIP and not usable at all yet.
Current Problems
- (The joystick KCM) is written in QtWidgets, and even from a code standpoint it's not really well designed at all (see !1360 (merged)) and desperately needs a refresh.
- People don't even know it handles game controllers:
I'm not sure why, because the KCM is named "Game Controllers" (I'm not sure if it was previously the known as the Joystick KCM) however a lot of the UI and the code itself refers to "joysticks" which is probably not helping.
- The UI is extremely table heavy and could probably be simplified a ton. See below for the current UI plan.
- It uses the old joystick Linux API, and should be ported over to reading the device information from evdev.
Current Design Plan
- Completely rebrand the interface towards "gamepads" and game controllers.
- Written in QML, and brought up to snuff with the current KCM design trend. For example, when no game controllers are connected, the interface is replaced with a placeholder message like "No gamepads found" similar to the touchpad KCM. No more really technical nonsense like manually entering a device file (what user would ever do this?)
- Use the modern evdev API!
- Two different interfaces:
- A "simple" mode which is the default, which shows a symbolic generic game controller (360-style) with buttons that change on controller state changes.
- An "advanced" mode similar to the current interface (but less reliant on tables), which gives more of a proper info dump including all buttons for users testing more obscure controllers.
No new features are planned, because rewriting the whole thing and switching APIs is going to be enough work already.
To ease testing and comparing missing features, the replacement KCM is registered under kcm_joystick2
and is named "Game Controller 2".
Edited by Joshua Goins