I’m not using an .ini file for Kodi itself (because I’m not using the controller to actually control Kodi), so YMMV on the following:
As soon as you enable custom inputs in Luna, it passes all the devices to moonlight like this:
moonlight stream [app-name] -input [all other devices] -mapping [mapping-file] -input [all devices that have a mapping file attached]
To give you an example from my machine:
moonlight stream Steam -input /dev/event4 -input /dev/event5 -mapping /home/osmc/xbox-1.map -input /dev/event0 -input /dev/event1
where event4 ist my keyboard, event5 is my mouse and 0/1 are my X360 controllers.
Because the order of input devices is obviously important (the mapping file is used for all following inputs until another mapping is defined) Luna is supposed to order them by their mapping file automatically (i.e.: append all input devices that don’t use a mapping, append all input devices for mapping “A”, append all input devices for mapping “B”, etc…).
Sadly I don’t have a screenshot ready right now (and I can’t take one, I’m on a different feature branch right now which is way ahead anything you’ve seen of Luna so far), but usually I got my two X360 controllers set up and my KB/M combo afterwards. If this doesn’t work for you, you might also want to try to switch the order (having the KB/M combo assigned first and the controller after that; though remember that you still should attach a mapping file, that’s what this option is for (and why it’s disabled for non-controller devices )).
By the way, if no specific mapping is provided, moonlight falls back to its default mapping which is located at
/usr/local/share/moonlight/mappings. This file is responsible for the issue your seeing with Y and X being swapped, as it assigns button code 308 to btn_west (which should be 307) and vice versa.
If you have no luck setting up the desired behaviour via Luna I’d kindly ask you to provide me with a screenshot of the failing configuration (i.e. the settings -> input -> select input devices dialog) so I can have another look at this part.
Again, to provide a fast solution, you should be able to edit the
default.conf file in the above mentioned directory (never did, that’s why I’m saying “should”).
I do realize you’re going through a lot right now and even though you’ve stated that this is no inconvenience to you it makes me feel somewhat bad that the whole process of setting this up wasn’t as easy as it should be. Alas, Luna is still being worked on and while she has her quirks here and there I’m trying really hard to improve everyone’s experience. That being said, you also kind of picked a “bad” time to get into this: 0.6.0. was released just a few days back and is one if the biggest changes so far - I’m rebuilding parts of the underlying architecture (which is still not done) and 0.6.0 is more of an intermediate release to get some requested features out to the users as fast as possible, like multi controller support and audio device selection.
Point of this speech being: Luna is still a (mostly) one-man project and I’m really grateful for everyone who decides to use it and in return point out issues they’re having - that’s the only way Luna can grow and become better, since my own resources (especially regarding testing and the time it takes) are limited.