Wiimote support moved

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
einal Offline
Junior Member
Posts: 24
Joined: Oct 2007
Reputation: 0
Post: #1
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?
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,093
Joined: Dec 2007
Reputation: 12
Post: #2
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>

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
(This post was last modified: 2008-04-01 02:15 by topfs2.)
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,093
Joined: Dec 2007
Reputation: 12
Post: #3
<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>

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
(This post was last modified: 2008-04-01 03:06 by topfs2.)
find quote
rodalpho Offline
Fan
Posts: 597
Joined: Nov 2006
Reputation: 17
Post: #4
You're taunting us with your ability to edit posts, aren't you?
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,093
Joined: Dec 2007
Reputation: 12
Post: #5
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

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
freaksworth Offline
Member
Posts: 85
Joined: May 2006
Reputation: 2
Post: #6
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

freaksworth is not connected to or in any other way affiliated with XBMC, Team XBMC, or the XBMC Foundation.
find quote
topfs2 Offline
Team-Kodi Developer
Posts: 4,093
Joined: Dec 2007
Reputation: 12
Post: #7
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::ProcessKey(int Key)
Mainly minus, plus and home keys as they use a linuxbranch specific keyboard map.

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
(This post was last modified: 2008-04-19 14:05 by topfs2.)
find quote
freaksworth Offline
Member
Posts: 85
Joined: May 2006
Reputation: 2
Post: #8
.. thanks for explanation.
Would have been nice, though.

regards
f

freaksworth is not connected to or in any other way affiliated with XBMC, Team XBMC, or the XBMC Foundation.
find quote