Kodi Community Forum
Wiimote support moved - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Wiimote support moved (/showthread.php?tid=32314)



Wiimote support moved - einal - 2008-04-01

A couple of revisions ago wiimote support was removed from the core program and moved into an EventServer client. I understand the thinking behind it and I support it, but it means my keymappings for the wiimote in Keymap.xml don't work anymore.

Looking through WiiRemote.cpp I found hardcoded values for each of the buttons on the wiimote and that's a huge step back for me. By using Keymap.xml I could map the trigger button (B) to backspace in the menus to go up a level and to Stop (X) while playing videos etc.

Am I missing a way to use Keymap.xml with EventServer clients or am I doomed to let do with hardcoded values?


- topfs2 - 2008-04-01

Unfortunatly this isn't possible for now. It's a planned feature too be able to map it but it is not possible right now.

The reason for removal was that I don't really want patches and such on the one in code.

It's planned but I can't really give you a ETA on it i'm afraid.
I'm sorry for this and hope I haven't destroyed all your hopes and dreams with it Smile

<EDIT>If you have any improvement ideas on the Hardcoded values please state them</EDIT>


- topfs2 - 2008-04-01

<edit> you can also have the hardcoded be more specific, like wii_home or wii_a and then add and change these in keymap.xml</edit>


- rodalpho - 2008-04-01

You're taunting us with your ability to edit posts, aren't you?


- topfs2 - 2008-04-17

einal Wrote:A couple of revisions ago wiimote support was removed from the core program and moved into an EventServer client. I understand the thinking behind it and I support it, but it means my keymappings for the wiimote in Keymap.xml don't work anymore.

Looking through WiiRemote.cpp I found hardcoded values for each of the buttons on the wiimote and that's a huge step back for me. By using Keymap.xml I could map the trigger button (B) to backspace in the menus to go up a level and to Stop (X) while playing videos etc.

Am I missing a way to use Keymap.xml with EventServer clients or am I doomed to let do with hardcoded values?

Finally the WiiRemote EventClient is mappable.

This is an example:
Code:
<joystick name="WiiRemote">
      <altname>wiiremote</altname>
      <button id="1">Up</button>
      <button id="2">Down</button>
      <button id="3">Left</button>
      <button id="4">Right</button>
      <button id="5">Select</button>
      <button id="6">PreviousMenu</button>
      <button id="7">VolumeDown</button>
      <button id="8">XBMC.ActivateWindow(Home)</button>
      <button id="9">VolumeUp</button>
      <button id="10">ContextMenu</button>
      <button id="11">Screenshot</button>
    </joystick>
Where the button layout and such is: (taken from tools/EventClients/README.txt)
Code:
WiiRemote Support
-----------------

The executable depends on libcwiid and libbluetooth and is compiled using
# g++ WiiRemote.cpp -lcwiid -o WiiRemote
The WiiRemote will emulate mouse by default but can be disabled by running with --disable-mouseemulation
The sensitivity of the mouseemulation can be set using the --deadzone_x or --deadzone_y where the number is
the percentage of the space is considered "dead", higher means more sensative.
Other commands can be listed with --help

The WiiRemote is mappable with keymap.xml where button id's are the following:
1 = Up
2 = Down
3 = Left
4 = Right
5 = A
6 = B
7 = Minus
8 = Home
9 = Plus
10 = 1
11 = 2
The name is by standard WiiRemote but this can be changed with the --joystick-name



- freaksworth - 2008-04-19

Hi,
sorry, this is slightly offtopic, but if I use the WiiRemote event client on linux and send the signal via LAN to a XBOX xbmc, then it's only the pointer working, but not the buttons. clicks are registrated, you can hear (and see on HDD-LED) it, but nothing happens. How can I map these buttons or where?

thanks in advance
f


- topfs2 - 2008-04-19

freaksworth Wrote:Hi,
sorry, this is slightly offtopic, but if I use the WiiRemote event client on linux and send the signal via LAN to a XBOX xbmc, then it's only the pointer working, but not the buttons. clicks are registrated, you can hear (and see on HDD-LED) it, but nothing happens. How can I map these buttons or where?

thanks in advance
f

Unfortunatly you can't currently. I have no xbox so I can't update the code so it supports it. It has been discussed and will probably be incorparated as soon a dev backports the Dynamic SDL Joystick mappings (Which we use for EventClients) to trunk. Seeing it's dynamic it has some performance and memory disadvantage which must be investigated first. But rest assure the point is that it should be crossplattform Mappability somewere down the road hopefully Smile

You can however use the older code which isn't dynamic but I suspect that isn't of interest Sad it's prior rev 12704. Although you need to change some lines in the CWiiRemote:TonguerocessKey(int Key)
Mainly minus, plus and home keys as they use a linuxbranch specific keyboard map.


- freaksworth - 2008-04-20

.. thanks for explanation.
Would have been nice, though.

regards
f