Linux How do I get Multimedia keys working on a Alu Apple Bluetooth Keyboard ?
#1
Hello everyone.

I've been struggling with getting the multimedia keys on my bluetooth keyboard working. I'm hoping that someone else has had a similar problem and can give me a hand.

I have an apple bluetooth keyboard (aluminum model).
I have the keyboard working, via bluetooth, under Crystalbuntu 1 on an ATV1 (which is based on Ubuntu Hardy Heron and XBMC Eden), but the multimedia keys are not working.

When I press the keys, i get the following in the xbmc log:

Code:
13:42:12 T:3021936912   DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-i486-linux.so)
13:42:12 T:3021936912   DEBUG: Unloading: ImageLib-i486-linux.so
13:42:55 T:3021936912   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/bluetooth_acl_1d4fa73453_logicaldev_input) Condition ButtonPressed | back
13:42:55 T:3021936912   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/bluetooth_acl_1d4fa73453_logicaldev_input) Condition ButtonPressed | play-pause
13:42:55 T:3021936912   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/bluetooth_acl_1d4fa73453_logicaldev_input) Condition ButtonPressed | forward
13:42:56 T:3021936912   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/bluetooth_acl_1d4fa73453_logicaldev_input) Condition ButtonPressed | mute
13:42:56 T:3021936912   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/bluetooth_acl_1d4fa73453_logicaldev_input) Condition ButtonPressed | volume-down
13:42:56 T:3021936912   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/bluetooth_acl_1d4fa73453_logicaldev_input) Condition ButtonPressed | volume-up

No 'Onkey' entries in the log..

I have the following in '/root/.xbmc/userdata/keymaps/keyboard.xml'
(to check if the keys are being 'seen' by xbmc)

Code:
<!--Template XBMC keyboard file-->
<keymap>
  <global>
    <keyboard>
<f1>Notification(Key, f1, 3)</f1>
<f2>Notification(Key, f2, 3)</f2>
<f3>Notification(Key, f3, 3)</f3>
<f4>Notification(Key, f4, 3)</f4>
<f5>Notification(Key, f5, 3)</f5>
<f6>Notification(Key, f6, 3)</f6>
<f7>Notification(Key, f7, 3)</f7>
<f8>Notification(Key, f8, 3)</f8>
<f9>Notification(Key, f9, 3)</f9>
<f10>Notification(Key, f10, 3)</f10>
<f11>Notification(Key, f11, 3)</f11>
<f12>Notification(Key, f12, 3)</f12>
<back>Notification(Key, back, 3)</back>
    </keyboard>
  </global>
</keymap>

If I type fn+F7 (same button as the multimedia key 'back', but switched to function mode).. i get the following:

Code:
14:14:46 T:3021936912   DEBUG: SDLKeyboard: scancode: 49, sym: 0120, unicode: 0000, modifier: 0
14:14:46 T:3021936912   DEBUG: OnKey: f7 (f096) pressed, action is Notification(Key, f7, 3)

So that key works.


I have used 'xev' to check the keycodes:
back = 234
play-pause = 162
forward = 233
mute = 160
volume-down=174
volume-up=176
eject=204

so I previously tried the following in keyboard.xml

Code:
<keymap>
  <global>
    <keyboard>
      <key id="234">Rewind</key>
      <key id="162">Play</key>
      <key id="233">FastForward</key>
      <key id="204">Stop</key>
      <key id="160">Mute</key>
      <key id="174">VolumeDown</key>
      <key id="176">VolumeUp</key>

log shows same result.

Any idea on how to get the multimedia keys working ?

Thanks in advance for any help anyone can provide.

Cheers
Reply
#2
After looking at various forums for info, and testing each posted 'solution', I think I have a grasp of what is happening.

At the very least, I know how to work around the issue, and get the keyboard's multimedia keys working.
In fact, I see no reason why this won't work for other keyboards.

I have all the keys working except one. (for some reason the 'expose' key won't show up in the xbmc debug log at all)
I'm looking into another possible option.
Stay tuned.. I'll be posting instructions for those who need them.


Note:
From what I have read, the keyboard seems to "just work" for those who are using a newer version of linux.
As noted above, Crystalbuntu 1 is based on Ubuntu 'Hardy Heron'.
I suspect that this issue will not exist with the upcoming Crystalbuntu 2.0 which, as far as I understand will not only be based on Ubuntu Precise, but will be able to be upgraded to a newer Ubuntu version by the user.
Reply

Logout Mark Read Team Forum Stats Members Help
How do I get Multimedia keys working on a Alu Apple Bluetooth Keyboard ?0