Android Keymap file for joystick.xxx missing / removed on android build
#1
It seems like all joystick.XXX keymap files have been removed from xbmc
android Gotham Beta 2 and replaced with a single joystick.xml file. All
keymap files where present in the android version xbmc 12.3

My remote control app is using the event server to send commands and
relying on the mappings defined in joystick.WiiRemote.xml

Would it be possible to add that file or all joystick files back?
Otherwise the user has to manually add the keymap file in
/mnt/sdcard/Android/data/org.xbmc.xbmc/files/.xbmc/userdata/keymaps

I opened a trac ticket but was told to ask for help in the android forum
http://trac.xbmc.org/ticket/15054
Reply
#2
On Android, all joysticks will send the same button/axis ids, so having different ones per device is pointless.
Why and how are you relying specifically on the WiiRemote mapping file?
Reply
#3
I was using a wiimote to control xbmc for many years to control xbmc. When I started to develop music pump xbmc remote for android I was looking for a way to create a remote control. The problem I faced was that you need to add a lot of buttons for specific actions which will only work on some screens.
I had the idea to use the keymap file of the wiimote which enables you to control xbmc using 12 buttons and as a bonus the user can customize the mappings if desired.

Basically the remote is sending key presses to the event server by specifying that the wii remote keymap file should be used to decode key presses.

The generic joystick keymap file seems to use other button / axis mappings than the ones specified in the wii remote keymap file. Therefore using the generic keymap file won't work for the wiiremote as it will send a wrong keypress
Reply
#4
Oh, so you're not actually using a wiimote at all? The way your app is working is quite bizarre Wink

Why not using the plain keyboard keymap, then?
Or just check for Gotham and use the standard joystick keymap.
Or use json-rpc, as it should be.

Anyway, this is hardly a proper reason to add back a joystick map which would probably not work if an actual wiimote was used...
Reply
#5
I agree, the way the remote is implemented is a bit bizzare but very powerful and fully customizable by the user and I would love to keep it that way. You should try out the remote Big Grin

A wiimote is communicating over bluetooth with xbmc-wiimote which will decode the commands and send them to the xbmc eventserver. My app is sending the same commands as the xbmc-wiimote would so it is basically emulating a wiimote. I have no idea if xbmc-wiimote can be compiled and executed on android but I am pretty sure that it would not work properly if the keymap file is missing.

Using json-rpc is not an option since the remote also supports eden and frodo which have no or partial support for json-rpc mappings. I am dynamically remapping the buttons depending on the screen so I would require to poll xbmc for the active window all the time (a feature which is only available since frodo ) to decide which keypress should be sent. A keymap serves exactly this purpose.

I could remap the buttons using the standard joystick keymap (which has ~15 buttons instead of 11) but it won't give the flexibility of the wiiremote keymap since many useful mapping are not defined in the joystick keymap file. Example: In the file explorer or you cannot move an item up or down from the current playlist with a simple joystick button press.

Code:
<MyFiles>
    <joystick name="WiiRemote">
      <button id="7">Move</button>
      <button id="9">Copy</button>
      <button id="11">Highlight</button>
    </joystick>
  </MyFiles>
  <MyMusicPlaylist>
    <joystick name="WiiRemote">
      <button id="7">MoveItemUp</button>
      <button id="9">MoveItemDown</button>
      <button id="11">Delete</button>
    </joystick>
  </MyMusicPlaylist>

If I use the plain keyboard keymap file I need to send different key strokes depending on the screen shown by xbmc and I also need to manage a list of all interesting window id's. The user won't be able to customize commands anymore.

It would be really great if the wiimote keymap file can be added back again otherwise I have to try to explain to the user that he should manually add the file in the keymap folder (not very userfriendly) or I will have to write a different remote especially for gotham which will be far less flexible than the current one.
Reply
#6
I understand the idea, and it's quite a clever one, actually.
Using a specific joystick map is not a good idea, though, imo.

The way to go would surely be to use the remote key mapping. Is that feasible?
Reply
#7
I had a quick look at the key mappings provided in the remote mapping file at
https://github.com/xbmc/xbmc/blob/master...remote.xml

Using this remote keymap file I have to redesign the remote because I need to include a couple of additional buttons to be able to fully control xbmc (basically all buttons except the number keys) which are present on a xbox remote.
Image

It would probably be the best alternative to the wiimote layout. IMO the wiimote keymapping contains much better mappings than the remote (especially the ones mapped to 0-9) and I would really prefer using this mapping for all platforms without having to make an exception for android. It would be fantastic if you could add the wiimote keymap file back into the android build.

Another workaround I prefer not to use: XBMC has a built-in function system.exec and android seems to have wget installed Angel

Besides I think it could be useful to have a small android app which pairs with a wiimote controller, intercept button presses and send button presses to the xbmc event server (the same way xbmc-wiimote is working). Such an app would require the wiimote keymap file. Existing solutions to pair a wiimote with android seem to use android IME and let you assign one action per button.
Reply
#8
(2014-03-27, 22:12)Millencolin007 Wrote: Besides I think it could be useful to have a small android app which pairs with a wiimote controller, intercept button presses and send button presses to the xbmc event server (the same way xbmc-wiimote is working). Such an app would require the wiimote keymap file. Existing solutions to pair a wiimote with android seem to use android IME and let you assign one action per button.

Any chance to get that keymap file included back into the android version? It would be good to know since it requires quite some work on my side to reimplement a different remote (and the current one is broken because of the removal of the keymap file)

I also wrote a small android test app to use a real wiimote to control xbmc on android. It was not complicated to connect to the wiimote over bluetooth and then send the button presses to xbmc over udp to the event server => getting an app similar to xbmc-wiimote running on android is possible and would require the wiimote keymap file for the best mappings.
However the problem is that the bluetooth stack was changed on android 4.2 and it is currently not possible to pair a wiimote with recent android versions...
Reply

Logout Mark Read Team Forum Stats Members Help
Keymap file for joystick.xxx missing / removed on android build0