| XBMC and the Jaycar/Digitech XC4889 Media Center Remote |
|
| Saturday, 04 July 2009 06:37 |
|
The Microsoft Media Center remote is reported to work great with XBMC, however Microsoft no longer sells them here in Australia, so I had to find something else. One option would have been to order a Windows Media Center remote, but that would have been like giving money to the Spanish Inquisition... and besides it'd take a few days to arrive, so a quick Google lead me to my nearest Jaycar store and the Jaycar Media Center Remote Control XC4889, for about $30. Since writing this article, I have discovered that this remote is known under several different brands, including Digitech, all of which share the model number XC4889. The remote
That sounded easy to use and it would have been, had XBMC actually been able to detect more than one key press at time. Instead XBMC simply discards any keys that are pressed after the first one, and since many of the buttons on the remote send a control code (ctrl, shift or alt) before a useful character, XBMC won't respond to most of the buttons. Yay. I used xev and xkeycaps (in the repo) to get the data for the diagram on the right. Several buttons produced no output, (right Shutdown, MSN and MOUSE). The Cursor, OK, Mute and Volume buttons all worked out of the box. The More button sends a right mouse click, which brings up a useful menu while playing a movie in XBMC. You can press the Back button to hide the menu. Luckily, there's a bit of a kludge that can be used to get around this multi-key press problem. xmodmap can be used to disable the control keys so that XBMC will only receive the regular character key presses. Execute the following script before starting XBMC and you can now discard all the control characters off of the diagram. Play will produce a "p" character instead of Ctrl+Shift+P, for example. #!/bin/bash And to re-enable the control keys: #!/bin/bash Like any quick hack, there are side effects. Certain buttons will now be doubled up. For example the Rewind button is Ctrl+Shift+B and the Replay is Ctrl+B. By disabling the control codes, both buttons now produce a "b" keypress. This also afflicts the Forward/Skip buttons, left Shutdown/MyTV and OK/Home/Enter, but it's a small price to pay since the majority of the buttons work with no problems. Play/Pause is s special case because both buttons toggle playback and pause, so despite producing the same keypress, they will appear to be working. Keymap.xmlFinally, I've attached my very simple, custom Keymap.xml, which is used to tell XBMC what to do when it receives a keypress. This file resides in "~\.xbmc\userdata\Keymap.xml". I've added one special key to the file which the remote doesn't produce, "n", which will close down XBMC without shutting down the computer, which is useful for tweaking the configuration of XBMC when it's running in fullscreen mode. <keymap> Notes
|

