个人工具

UbuntuHelp:Logitech UltraX Remote

来自Ubuntu中文

Wikibot讨论 | 贡献2008年12月16日 (二) 19:16的版本

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

Introduction

Get Multimedia Keys running I just tested this HowTo with a Logitech UltraX Remote and the diNovo Edge keyboard - but I think this probably a solution for similar keyboards/remotes whith fancy special keys.

Logitech UltraX Remote Installation

I've just bought a new Logitech UltraX Remote control (sorry found no tech site). The first impression was ok, just plugged the USB stick and my ubuntu gutsy identified a new usb keyboard. Unfortunately only half of the keys where working out of the box. I also had an old Logitech diNove Edge keyboad here. Some of the extra keys never worked until today.

diNove Edge keys

  • NOT working:
  • Zoom In, Zoom out and Zoom%
  • Fn-A, Fn-B, Fn-C, Fn-D (these will still not work with this solution)
  • working out of the box:
  • all others and touchpad and volume slider.

UltraX Remote Keys (working)

Out of the box keys are:

  • First block
  • Home
  • Close
  • Pictures
  • Second block
  • All numbers
  • Clear, Enter
  • Volume Up, Volume Down, Mute
  • Third block
  • Up, Down, Left, Right, Enter
  • Forth Block
  • Record, Stop
  • Forward, Back, Fastforward, Fastbackwards, Play/Pause
  • Fifth Block
  • Back
  • DVD Menu
  • Repeat, Info/EPG

A few keys were automatically applied to the correct functions. The others can be configured with

  gnome-keybindings-properties

The other ten keys did not work. But they are not lost. But it's a little bit tricky to get them working!

Troubleshooting

The following steps are not necessary. If you're not interested in these findings just go to nect section Install KeyWatcher First you can test the keys with evtest which is provided by the dvb-utils package:

  aptitude install dvb-utils

You need to know the event interface which you can obtain with:

  cat /proc/bus/input/devices

output will be sth like:

  I: Bus=0003 Vendor=046d Product=c101 Version=0110
  N: Name="Logitech USB Receiver"
  P: Phys=usb-0000:00:1d.1-2/input0
  S: Sysfs=/class/input/input19
  U: Uniq=
  H: Handlers=kbd event8
  B: EV=120003
  B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
  B: LED=7

  I: Bus=0003 Vendor=046d Product=c101 Version=0110
  N: Name="Logitech USB Receiver"
  P: Phys=usb-0000:00:1d.1-2/input1
  S: Sysfs=/class/input/input20
  U: Uniq=
  H: Handlers=kbd event10
  B: EV=100003
  B: KEY=42c43b2 20d0400 0 0 0 4 1c000 31f8 d0011806 8e0040 0 0 0

you're looking for the the one with KEY=42c43b2 20d0400 0 0 0 4 1c000 31f8 d0011806 8e0040 0 0 0

  sudo evtest /dev/input/eventX (in the case above event10)

Output will be sth like:

 Input device ID: bus 0x3 vendor 0x46d product 0xc101 version 0x110
 Input device name: "Logitech USB Receiver"
 ...
 Event: time 1200182022.289435, type 1 (Key), code 398 (Red), value 0

Some keys on the diNovo Edge (e.g. zoom key) didn't have a name, just a code.

 Input device ID: bus 0x5 vendor 0x46d product 0xb309 version 0x11b
 Input device name: "Logitech         Keyboard"
 ...
 Event: time 1200184687.026182, type 1 (Key), code 419 (?), value 0

The * Fn-A, Fn-B, Fn-C, Fn-D buttons do not show up in evtest. All the missing buttons are generating keycodes > 255 (the red start button in the example above creates code 398) which the normal keyboard handler can't handle. As far as i know tools like lineak or keytouch cannot manage these keycodes. I tried to map them in .Xmodmap, but that didn't work. After some research i found this post from the keytouch developer - still waiting for an appropriate kernel patch. Fortunately the (new) input event (kernel > 2.6) system can manage codes > 255! After a new google search revealed keyWatcher. To get this running with ubuntu gutsy you need to do the following:

Get ALL keys working (Keys with key codes > 256 ) - keyWatcher

  1. download the latest source of keyWatcher check out 2.0.1
  wget http://prdownloads.sourceforge.net/criticalmass/keyWatcher-2.0.1.tar.bz2?download
  bunzip2 keyWatcher-2.0.1.tar.bz2
  tar xf keyWatcher-2.0.1.tar
  cd keyWatcher-2.0.1
  ./configure && make && make install # would be it.. but !!
  1. make sure you've installed qt-sources:
  sudo aptitude install qt3-dev-tools
  1. due to an configure skript error you have to set the QTDIR manually
  make clean  # may fail.. no problem
  export QTDIR=/usr/share/qt3   # for ubuntu gutsy/edgy/feisty
  ./configure && make
  sudo make install

Now we've to configure the missing keys.

Configure KeyWatcher

Do this as user.

  • First we create a config file in the user home.
  cp watcher/keyWatcher.conf ~/.keyWatcher
  • Testrun keyWatcher daemon. There is a rights issue with the /dev/input/eventX file. We just allow the user to access it. This is quick and diry. Sorry.. but its 2:34am
  gksudo chmod +r /dev/input/event*  
  keyWatcher -isDaemon 0 -verbose 1

The daemon is running now. Watch him on one console.

  • Go to another console, become root again, and start to configure you keys (with a GUI).
  keyConfig
  • The tool is quite self explaining :-)
  • You have to restart the keyWatcher programm to acces the freshly defined keys ...
  • That should be it. Test if it works. You can control the daemon with:
 keyWatcher -isDaemon 1
 # running
 keyWatcher -exit
 # killed

You can find some valuable information in the readme file.

  vi readme.txt

Start at boot

To start keyWatcher every time when you log into ubuntu: create a starter script in your home dir

  touch startKeyWatcher
  chmod +x startKeyWatcher
  vim startKeyWatcher

and add:

  #!/bin/bash
  keyWatcher -exit
  gksudo chmod +r /dev/input/event*  # THIS IS UGLY AND NOT SMART.. PLEASE SOMEONE FIND A SMART UDEV SOLUTION
  keyWatcher -isDaemon 1

Now, to start the script every time you log in, go to System->Settings->Sessions and create a new start program entry: Name: keyWacther Command: select startKeyWatcher Comment: Full USB multimedia key support Tick the checkbox and it should start everytime your start your session