Joystick support via SDL2 library?

That sounds quite nice actually! This could even be specialized for certain joysticks, to get nice names for the buttons, like “Saitek X55 Switch 1”.

The issue I’m worried about is that FKey:s are used kind of like constants in many places:

InvalidKey.png

I can only create this event when that device is plugged in, and when it’s not I get a warning.

But this isn’t how it should be done anyway - when bound to an action/axis mapping there don’t seem to be any warnings about missing keys.
So I think you have convinced me, this seems like the best way. :slight_smile:

Now I’m just thinking about how to handle multiple devices of the same type in the best way… maybe default to making all devices control player 1, and make a function for assigning a device to another player? That should work well both for a HOTAS with two joysticks, and for split screen multiplayer.

I’ll try to help making hot plug work again if your not planning to do it yourself.