Physical gamepads are supported by memory mapping, the game itself doesn't know if the player is using a keyboard, touchscreen, or real gamepad.
I think if multiplayer will ever be supported, it should be abstracted in the same way. We might create a runtime for libretro, which could enable adhoc netplay "for free".