I have a PS3 Bluetooth remote which I have paired with my Ubuntu 14.04.1 system and a lot of the buttons work (i.e. they generate events which 'xev' can see) however a significant number do not (L1-L3, R1-R3 and others).

Unfortunately I need those buttons to control the volume so I am looking for a way to map them somehow.

I know the kernel sees those as events because 'evtest' sees their key presses, however X does not.

Note that previously I had this working on an older Ubuntu system (10.04.4) by following http://wiki.xbmc.org/index.php?title=How-to:Setup_PS3_BD_Remote however that doesn't seem correct anymore (input.conf doesn't hold mappings any more).


The buttons are not being seen by X because their key code is >255.

I tried LIRC to act as a remapping layer (using the devinput driver) but then I lost key repeating which was a deal breaker.

In the end I found http://www.thenautilus.net/SW/xf86-input-evdev/ and patched the driver (v2.8.2 on this version of Ubuntu).


First install these packages

sudo apt-get install git automake autoconf pkg-config xcb-proto xutils-dev libtool xserver-xorg-dev libudev-dev

Clone the repo and build

git clone git://www.thenautilus.net/xf86-input-evdev
cd xf86-input-evdev
git pull git://www.thenautilus.net/xf86-input-evdev code-remap-2.8.2
sudo mv /usr/lib/xorg/modules/input/evdev_drv.so /usr/lib/xorg/modules/input/evdev_drv.so.orig
sudo cp ./src/.libs/evdev_drv.so /usr/lib/xorg/modules/input/evdev_drv.so

cat > /usr/share/X11/xorg.conf.d/99-evdev.conf <<EOF
Section "InputClass"
    Identifier "evdev keyboard catchall"
    MatchIsKeyboard "on"
    MatchDevicePath "/dev/input/event*”
    MatchProduct "PS3 Remote Controller"
    Driver "evdev"
    Option "event_key_remap" "311=76 313=75 318=74"

This will re-map the right 1/2/3 buttons to volume up/down/mute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.