Driving XBMC with Tooploo T2 air mouse

For a while now, I’ve been looking for a simple remote for my XBMC media center. I finally found the Tooploo T2 air mouse from DX.com which comes with a nice set of buttons for media centers.

To use this air mouse with XBMC, I override default key bindings with a custom XML file given below. This file is placed in my home folder : ~/.xbmc/userdata/keymaps/airmouse.xml

I did managed to bind almost all keys except the right button below arrows. xev says its Super_L, but I did not manage to find how to bind it (either with id 65515 not Super_L). I disabled mouse move / drag because it was bothering me during selection, however, mouse left click is hijacked to simulate enter key behavior and mouse right click is bound to esc key behavior.

The behavior obtained seems awesome to me. Hope you’ll enjoy it too.

<!-- Air Mouse : Tooploo T2 Wireless Gyroscope Air Mouse -->
<keymap>
  <global>
    <keyboard>
      <volume_down>VolumeDown</volume_down>
      <volume_up>VolumeUp</volume_up>

      <left>Left</left>
      <right>Right</right>
      <up>Up</up>
      <down>Down</down>

      <home>XBMC.ActivateWindow(Home)</home>
      <play_pause>Pause</play_pause>
      <pageup>FullScreen</pageup>
      <pagedown>Info</pagedown>
      <volume_mute>Mute</volume_mute>
    </keyboard>
    <mouse>
      <leftclick>Select</leftclick>
      <rightclick>PreviousMenu</rightclick>
      <mousedrag>noop</mousedrag>
      <mousemove>noop</mousemove>
    </mouse>
  </global>
  <FullscreenVideo>
    <mouse>
      <leftclick>Pause</leftclick>
    </mouse>
  </FullscreenVideo>
</keymap>

 

7 Replies to “Driving XBMC with Tooploo T2 air mouse”

  1. Thanks for posting this, it saved me hours on getting to grips with this mouse.

    The right button below the arrow is “super” and corresponds to the windows key on a microsoft keyboard. Unfortunately you can’t use super as a standalone key (unless anyone else knows of a way) but you can use it like a shift key to add extra functions to the other buttons, as in my set up here.

    <!– Air Mouse : Usb Compliant device Usb Compliant device
    –>
    <keymap>
    <global>
    <keyboard>
    <volume_down>VolumeDown</volume_down>
    <volume_up>VolumeUp</volume_up>
    <pagedown mod=”Super”>SkipNext</pagedown>
    <pageup mod=”Super”>SkipPrevious</pageup>
    <left mod=”Super”>BigStepBack</left>
    <right mod=”Super”>BigStepForward</right>
    <up mod=”Super”>ContextMenu</up>
    <down mod=”Super”>Info</down>
    <home mod=”Super”>ActivateWindow(shutdownmenu)</home>
    <play_pause mod=”Super”>Fullscreen</play_pause>
    <volume_up mod=”Super”>SetVolume(100%)</volume_up>

    <left>Left</left>
    <right>right</right>
    <up>Up</up>
    <down>Down</down>

    <home>XBMC.ActivateWindow(Home)</home>
    <play_pause>Pause</play_pause>
    <pageup>PageUp</pageup>
    <pagedown>Pagedown</pagedown>
    <volume_mute>Mute</volume_mute>
    </keyboard>
    <mouse>
    <leftclick>Select</leftclick>
    <rightclick>back</rightclick>
    <middleclick>XBMC.ActivateWindow(Home)</middleclick>
    <doubleclick>Stop</doubleclick>
    <mousedrag>noop</mousedrag>
    <mousemove>noop</mousemove>
    </mouse>
    </global>

    </keymap>

  2. Hey,

     

    I tried to use the configuration on windows, but XMBC (12.2 frodo) does not override the default key bindings.  I tried with filename airmouse.xml and keyboard.xml.

    Any idea why?

    Thanks!

  3. I got no Windows installed to try out, but you need to be sure file is read correctly.
    What you could do is change the config content to something you’re sure is wrong. For example replace all the XML with raw text. Then ensure in XBMC log that there is an error message about your configuration file.

    Hope it will help.

  4. No sure why, but it seems windows is catching some buttons instead of XBMC. super button for example, is always caught no matter what is set in the confing.

    Is there a way to see what events is XBMC receiving when pressing buttons?

     

    regards.

  5. Sorry, I got no idea how to do this. Keep me posted if you find out.
    On the other side, it seems fair that Windows captures the meta key.

  6. If you speak about the power button at the top of the remote, I believe you won’t be able to map it.
    It is only here to turn the remote on and off.

Leave a Reply

Your email address will not be published. Required fields are marked *