Skip to content
README.md 1.61 KiB
Newer Older
Javier Marcet's avatar
Javier Marcet committed
Hama MCE Remote event client
----------------------------

Original code from http://trac.kodi.tv/ticket/8827

Hi, since the HAMA MCE remote control (sold under different brand names by different vendors) has a -- ermm, let's say: -- somewhat strange protocol, I decided to write an event client for this remote to bypass the OS driver and intermediate libraries (X11/Aqua/SDL etc.).

The attached source resolves the following issues, which I found annoying:

* the remote registers 2 input devices, some keys register as mouse buttons, other as keyboard keys. This makes mapping in keymap.xml difficult. The attached event driver sends key and action events which are easy to map.
* right mouse button and info key have the same keycode, but it is possible to distinguish them by counting the different number of key-up events. The attached code does this, so that we can use one key as "info" and the other as "right mouse button" (or "contextmenu").
* a matching keymap is provided (contains only a single entry, since the event client already sends "intuitive" events to xbmc).
* the event client is started by udev under linux, and stopped when the device is disconnected.
* Keyrepeat and mouse works now as expected.

The code has only a single dependency to libusb-1.0, which is fetched, built and linked statically inside the event client. unpack the source and type "make install" to build and install.

The source has been tested on xbmc/linux and the 9.11 live release, but should work on every platform supported by libusb-1.0 (including MAC/OSX).

Maybe this is useful to others and could go into the event client source tree in SVN?