kodi-game / controller-topology-project

The Controller Topology Project models how controllers connect to and map to each other for all gaming history
Open Data Commons Open Database License v1.0
21 stars 15 forks source link

Map keyboard keys and joypad buttons for the same controller #189

Open helviojr opened 1 year ago

helviojr commented 1 year ago

I am not even sure if this is the correct place, but I'm trying to use Atari 2600 emulator with an Atari 2600 controller. The problem: the emulator expects controller 1 has its 5 buttons PLUS the console buttons (select, reset, color etc.), but, as expected, the controller has only its 5 buttson (fire, up, down, right and left).

If I try to use keyboard keys to map console's keys, the emulator expects I use the keyboard for all (controller is ignored). If I configure the mapping using the controller, I only get 5 commands, and can't even start the games.

Isn't there a way to have both keyboard for some keys, controller for others, on the same joypad? Or is that a limitation on libretro?

garbear commented 1 year ago

Unfortunately, this seemingly simple use case isn't supported in Kodi yet. Such "libretro controllers" can only be controlled with a single Kodi controller, and keyboards can't be used to control any libretro controllers.

The next feature I'm working on is a "Player Manager" that can map basically any input to any other input. It'll support both injective (two kodis, one libretro) and surjective (one kodi, two libretros) mapping. And the keyboard can come in and cover any unmapped buttons.

So a solution is planned, but it'll be a while before it's ready given my current limited time for Kodi.