Many special keys on Logitech Wave keyboard don't work

Bug #215035 reported by Jochen Topf
88
This bug affects 15 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned
udev (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Many of the special keys don't work on the Logitech Wave (USB) keyboard
(http://www.logitech.com/index.cfm/keyboards/keyboard/devices/3071&cl=de,de).

Tested with 8.04 Hardy Beta.

Details:
* The "audio keys" (incr/decr vol, prev/next song, stop, start/pause) work as expected, the mute button sort of works (the popup window appears) but doesn't actually mute the sound
* The many "windows vista" buttons etc. don't even show up with "xev", only the "music" button shows up in xev, but doesn't do anything
* The calculator key works, the "internet explorer key" starts firefox, the "email key" starts evolution

Related branches

Revision history for this message
Steffen Banhardt (steffenbanhardt) wrote :

Mute key works here as expected, email key starts the standard mailer (thunderbird), iexplorer and calculator work too; suspend works (ok - it pops up an error, that the machine won't suspend...). *All* other funktion key-combos don't even show up in xev.

Revision history for this message
asdf (asdf123123-deactivatedaccount-deactivatedaccount) wrote :

some work out of the box, cool :) (at least in gnome..)

the zoom key on the left of the keyboard does not work and also the one to stack the windows and scroll through them does not work.. I would be glad if Canonical (or any developer) could talk to Logitech about that.

Revision history for this message
Cinar Sahin (csahin) wrote :

Using keytouch (2.4.0 from source) and keytouch-editor (3.20 beta from source) I have all of the extra keys recognized. I use the attached configuration. For the keys not in the config file (zoom in/zoom out, vista, volume up/down, mute, calc) I use gnome keyboard shortcuts. It's much cleaner that way.

Although the Fn key is recognized, I couldn't get it to work with F-key combinations (except for F7 and F9 which worked out of the box). Also, I couldn't get the Vista key to Initiate Window Switch, although other functions can be assigned for that key.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in linux:
assignee: nobody → crimsun
status: New → Incomplete
Revision history for this message
Tomasz Rzepecki (nub) wrote :

it is, moreover keytouch doesn't seem to be able to map any keys properly.. #292471 might be related.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

i mean, it is reproducible in intrepid 64-bit.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

after some research i found there's a proprietary piece of software to do this, but it doesn't support 64-bit kernels, so i can't even see if it works correctly, but it might help those of you who have 32-bit systems:
http://www.hidpoint.com/

Revision history for this message
Tomasz Rzepecki (nub) wrote :

i tried and tested all the special keys with xev. most of them don't even show up - the only exceptions being the ones mentioned before: volume controls, music player controls (including the "music" button), email, web browser, calculator, suspend, and the context menu button (which is issued by fn-print screen). notably, scroll lock does NOT work (it should be fn-pause/break).

Revision history for this message
Tomasz Rzepecki (nub) wrote :

again, scroll lock does show up on xev, it just doesn't work as scroll lock.

there should be an edit comment feature here on launchpad..

Revision history for this message
Tomasz Rzepecki (nub) wrote :

i checked the keys through input-test, and it detects them all just fine. scroll lock also seems to work in tty, so it might be that it's simply disabled somewhere in x.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

i tried and made an .fdi file in /etc/hal/policy to map the keys using the codes yielded by input-events (as https://wiki.ubuntu.com/X/Config/Input suggests i should do), but it doesn't work at all..
lshal seems to indicate that the file did register and match properly, but there's still no response in xev.
i'm pretty sure that least some of the keycodes are valid, since i previously downloaded a keytouch file for the keyboard that maps only a few of the keys, and the keycodes match
i attach the (not working) fdi file. it contains the key codes. i'm not sure if the "input.originating_device" will match for other devices, i use it to make sure it matches only to the "second" keyboard (the "first" contains the regular keys).

Revision history for this message
Spider (spider-alternating) wrote :

I can verify that the keys still do not work properly in Ubuntu (9.04 nor 8.10)

Steve Langasek (vorlon)
affects: hotkey-setup (Ubuntu) → udev-extras (Ubuntu)
Changed in udev-extras (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu):
status: New → Invalid
Revision history for this message
Tomasz Rzepecki (nub) wrote :

today i tried running keytouch-config again and it seems like it actually works, and does recognize all the extra keys (it reads the scancodes), however it doesn't solve the problem for several reasons:
- it doesn't recognize Fn as a modifier key, and thus it makes it impossible to directly input fn-modified keys (though this could probably be circumvented by manually typing the scancodes captured using input-test or smth previously into the config file)
- it seems to mess up when saving the file - for some reason the scancodes saved into the file are only the first 3 digits of the genuine scancode (which, again, could be circumvented using manual methods)
- given a manually created config file, keytouch does list them and allow configuration, however it does nothing (it doesn't seem to respond to key presses regardless of the command set). rebooting did not help.

Revision history for this message
Martin Pitt (pitti) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Please exercise the steps at https://wiki.ubuntu.com/Hotkeys/Troubleshooting to determine at which level your hotkey problems occur, and attach the collected information. Thanks!

affects: udev-extras (Ubuntu) → udev (Ubuntu)
Changed in udev (Ubuntu):
assignee: Daniel T Chen (crimsun) → Martin Pitt (pitti)
Revision history for this message
Tomasz Rzepecki (nub) wrote :

i tried it (using ubuntu 9.10 live cd), and:
-xev reports no input on the nonmapped keys.
-the /usr/share/doc/udev/README.keymap.txt file does not exist, however there exists such a file at /usr/share/doc/udev-extras/
-following the instructions, i found that:
/usr/share/udev-extras/findkeyboards yields no output
manually testing the second keyboard device with
sudo /lib/udev/keymap -i input/event6
does yield output when pressing mapped keys, however, when i press the unmapped keys it segfaults.

Revision history for this message
Martin Pitt (pitti) wrote :

It seems that you are using an older live CD, alpha-2 perhaps? Anyway, let's debug this then

> /usr/share/udev-extras/findkeyboards yields no output

Right, indeed this does not support USB keyboards yet. Can you please run the attached version instead? (Download it and do "chmod a+x findkeyboards", then run "./findkeyboards").

> when i press the unmapped keys it segfaults

Uh, not good. Could be that it has invalid keys assigned. Could you please run it with

  sudo gdb --args /lib/udev/keymap -i input/event7

(or whatever the event number is), then enter "run", press an unmapped key (which should trigger a crash) and do "bt full"? Please copy&paste the output.

Could you please try running "sudo showkey -s" instead, press the keys which don't work, and copy&paste the output? (together with a description of which output line corresponds to which key).

I also need the system vendor/product and udev dump (see steps 4 and 5 in README.keymap.txt)

Thanks!

Revision history for this message
Tomasz Rzepecki (nub) wrote :

is there any newer live cd? i believe alpha 3 is due to release on thursday?
anyway, the supplied file only detects the first keyboard device (which doesn't include any special keys)
showkey -s doesn't respond to the unmapped keys (even when launched through a virtual console), however i will attach the output of showkey -k.

ubuntu@ubuntu:~/Desktop$ ./findkeyboards
USB keyboard: input/event5
ubuntu@ubuntu:~/Desktop$ sudo gdb --args /lib/udev/keymap -i input/event6
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(no debugging symbols found)
(gdb) run
Starting program: /lib/udev/keymap -i input/event6
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Press ESC to finish

Program received signal SIGSEGV, Segmentation fault.
0x00f1a752 in ?? () from /lib/udev/keymap
(gdb) bt full
#0 0x00f1a752 in ?? () from /lib/udev/keymap
No symbol table info available.
#1 0x00f1aab7 in main () from /lib/udev/keymap
No symbol table info available.
(gdb) quit
The program is running. Exit anyway? (y or n) y
ubuntu@ubuntu:~/Desktop$ cat /sys/class/dmi/id/sys_vendor
MICRO-STAR INTERNATIONAL CO.,LTD
ubuntu@ubuntu:~/Desktop$ cat /sys/class/dmi/id/product_name
MS-7514

Revision history for this message
Tomasz Rzepecki (nub) wrote :
Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 215035] Re: Many special keys on Logitech Wave keyboard don't work

Tomasz Rzepecki [2009-07-18 22:20 -0000]:
> is there any newer live cd?

Yes, you can use the dailies
(http://cdimage.ubuntu.com/daily-live/current/), but it shouldn't
matter much at this point.

> anyway, the supplied file only detects the first keyboard device
> (which doesn't include any special keys)
>
> ubuntu@ubuntu:~/Desktop$ ./findkeyboards
> USB keyboard: input/event5

Ah, your udev dump shows that this USB keyboard is kind of "two devices in
one" and the hotkeys are on another device (input/event6).

> showkey -s doesn't respond to the unmapped keys (even when launched through a virtual console)

That's a shame. So I guess we need to use /lib/udev/keymap -i input/event6
after all.

> however i will attach the output of showkey -k.

That's not really helpful, I'm afraid, since we need the scan codes (-s).

> ubuntu@ubuntu:~/Desktop$ sudo gdb --args /lib/udev/keymap -i input/event6

Thanks for trying, that didn't help unfortunately. So I'm afraid you
have to try this again on the daily live CD, install debugging
symbols, and re-do this command afterwards.

For debug symbols, boot the live system, go to

  http://ddebs.ubuntu.com/pool/main/u/udev/

and click on udev-dbgsym_145-1_i386.ddeb or udev-dbgsym_145-1_amd64.ddeb
(depending on whether you use the i386 or amd64 live CD). This should
trigger the installation of that package.

Thanks!

Revision history for this message
Tomasz Rzepecki (nub) wrote :

here's the output (made with daily amd64 build w/ the symbols installed):
ubuntu@ubuntu:~$ sudo gdb --args /lib/udev/keymap -i input/event6
GNU gdb (GDB) 6.8.50.20090628-cvs-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) start
Temporary breakpoint 1 at 0x5bd5: file ../../../extras/keymap/keymap.c, line 276.
Starting program: /lib/udev/keymap -i input/event6
Press ESC to finish

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7ffca45 in format_keyname (key=0x0)
    at ../../../extras/keymap/keymap.c:119
119 ../../../extras/keymap/keymap.c: No such file or directory.
 in ../../../extras/keymap/keymap.c
(gdb) bt full
#0 0x00007ffff7ffca45 in format_keyname (key=0x0)
    at ../../../extras/keymap/keymap.c:119
        result = '\0' <repeats 100 times>
        s = 0x4 <Address 0x4 out of bounds>
        len = 0
#1 0x00007ffff7ffcd87 in print_key (argc=<value optimized out>,
    argv=<value optimized out>) at ../../../extras/keymap/keymap.c:240
        cur_scancode = 589848
#2 interactive (argc=<value optimized out>, argv=<value optimized out>)
    at ../../../extras/keymap/keymap.c:263
        ev = {time = {tv_sec = 1248031869, tv_usec = 866637}, type = 1,
          code = 263, value = 1}
#3 main (argc=<value optimized out>, argv=<value optimized out>)
    at ../../../extras/keymap/keymap.c:317
        options = {{name = 0x7ffff7ffe079 "help", has_arg = 0, flag = 0x0,
            val = 104}, {name = 0x7ffff7ffe07e "interactive", has_arg = 0,
            flag = 0x0, val = 105}, {name = 0x0, has_arg = 0, flag = 0x0,
            val = 0}}
        fd = 5
        opt_interactive = 1
#4 0x00007ffff7a825e6 in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
#5 0x00007ffff7ffc4c9 in _start () at ../sysdeps/x86_64/elf/start.S:103
---Type <return> to continue, or q <return> to quit---
No locals.
(gdb) quit
The program is running. Quit anyway (and kill it)? (y or n) y

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, perfect stack trace, thanks! I fixed the crash upstream:

http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=0dcf1ce

For your convenience I applied the patch to current Karmic udev and uploaded it to my PPA:

  https://launchpad.net/~pitti/+archive/ppa

so on current karmic, or the current karmic live CD, can you please install the updated udev package, and do the /lib/udev/keymap -i input/event6 exercise again?

Thanks, and sorry for all the hassle!

Revision history for this message
Tomasz Rzepecki (nub) wrote :

the new version seems to work alright, except it doesn't quit when i press esc (and it says it will). nothing ctrl-c won't "fix", though. anyway, here's the file made more or less according to step 3 in README.keymap.txt. i will also supply the original keymap file (in accordance with the 6th step).

Revision history for this message
Tomasz Rzepecki (nub) wrote :

also, i'm not sure what should i do to test locally - adding the line
ENV{DMI_VENDOR}=="Logitech*", RUN+="keyymap $name <filename>"
and running
sudo service udev restart
doesn't make xev nor /lib/udev/keymap -i input/event6 recognize the keys anymore, as far as i can tell.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

(an edit comment feature would surely be useful)
even without the typo in "keymap". :)

Revision history for this message
Jonas Norlander (jonorland) wrote :

I have a Logitech Wave to and are very interest to see full support for it and will help to debug if I can. One thing I noticed is that my keyboard seems to differ some from what Tomasz have. For me the key Fn+F11 is not "search" but has a icon of a battery on it instead. If a got the time i will try to do the debug steps mention above.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

i think the difference might come from the fact i have the corded variant of wave keyboard. anyway, on my keyboard fn-f10 and fn-f11 are almost the same - both have a magnifying glass, and f10 has "www" wrtiten under it, while f11 has "pc".
still, i can see that some keyboards do have a battery there (just by looking at the picture here:
http://www.logitech.com/index.cfm/67/529&cl=us,en you can see how mine looks here:
http://www.computerbox.hu/shop/images/logitech%20corded%20wave.jpg ).
do you have any idea what it is supposed to do (or a windows w/ setpoint to actually check it)?

Revision history for this message
Martin Pitt (pitti) wrote :

Tomasz Rzepecki [2009-07-24 23:20 -0000]:
> also, i'm not sure what should i do to test locally - adding the line
> ENV{DMI_VENDOR}=="Logitech*", RUN+="keyymap $name <filename>"
> and running
> sudo service udev restart
> doesn't make xev nor /lib/udev/keymap -i input/event6 recognize the keys anymore, as far as i can tell.

The udev restart won't help. You either need to reboot, or do
something like

  sudo udevadm trigger --subsystem-match=input

Or simply detach and reattach the keyboard.

Revision history for this message
Martin Pitt (pitti) wrote :

Tomasz, are you still interested in solving this? If so, please see my previous comment.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

iirc, i read your comment when you wrote it, tried it and it didn't work, and i was sort of tired of it.
i don't mean to blame you, you're one of the most responsive (and respectful) devs i've had to do with, it's just that i'm not too fond of tinkering with stuff i don't fully understand, especially considering i was booting into the live cd every time i had to check anything. ;)
perhaps i'll try it later this week on my laptop (which is currently running karmic).

Revision history for this message
Tomasz Rzepecki (nub) wrote :

i tried, and didn't manage to get any meaningful response. i tried adding the line "ENV{DMI_VENDOR}=="Logitech*", RUN+="keymap $name scancodes_logitech_wave" " after "keyboad_vendorcheck" as well as after "ThinkPad Extra Buttons", running the command you supplied AND replugging the keyboard, and in both cases absolutely nothing changed - /lin/udev/keymap -i still shows the same (numerical) keycodes and xev still does not respond.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

i tried, and didn't manage to get any meaningful response. i tried adding the line "ENV{DMI_VENDOR}=="Logitech*", RUN+="keymap $name scancodes_logitech_wave" " after "keyboad_vendorcheck" as well as after "ThinkPad Extra Buttons", running the command you supplied AND replugging the keyboard, and in both cases absolutely nothing changed - /lib/udev/keymap -i still shows the same (numerical) keycodes and xev still does not respond.

Revision history for this message
Tomasz Rzepecki (nub) wrote :

is there any way to check if it does match the keyboard at all? if it doesn't, what can i do to make it match?

Revision history for this message
Martin Pitt (pitti) wrote :

You can use "udevadm test" to see which rules are run on a particular device. For this, you need to look up the particular device in "udevadm info --export-db", and see which one you "want". For example, in your previously attached udev db dump this was:

P: /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.1/input/input6/event6
[...]
E: ID_VENDOR=Logitech
E: ID_MODEL=USB_Multimedia_Keyboard

Then you can check with

  udevadm test /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.1/input/input6/event6

whether it runs the rule you are about to create.

Where did you put your rule? You mustn't put it after the DRIVERS=="atkbd" check, since this is an USB keyboard. Please put it after this line:

ENV{DMI_VENDOR}=="", GOTO="keyboard_end"

thanks!

Revision history for this message
Dominik Boehi (dboehi) wrote :

I also have a Wave keyboard, and I managed to make the keys work using the following rule:

ENV{ID_VENDOR}=="Logitech*", KERNELS=="input*", ATTRS{name}=="Logitech USB Multimedia Keyboard", RUN+="keymap $name scancodes_logitech_wave.txt"

It seems that DMI_VENDOR is set to "System manufacturer", so you can't use that in the rule.

When I run

sudo /lib/udev/keymap -i input/event6

all keys now have a proper key code set, but not all of them are recognized in xev.
Do I have to modify anything else to make xev recognize them?

I have attached a modified version of Tomasz' scancode file, the keycodes for Fn + F10 (www search) and Fn + F11 (local search) were wrong.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, Dominik!

> not all of them are recognized in xev.

The problem is that many of those assigned key codes have a value > 255, which X.org cannot process yet. Please see bug 313514 for details. So far the only workaround is to only use keys from the 0..255 range, e. g. PROG1.

Revision history for this message
Martin Pitt (pitti) wrote :

I integrated your rule and wrote some generic "Is this an USB keyboard" structure around it. Since that structure hasn't been properly tested before, I would like you to confirm that it still works.

Can you please do

  sudo cp /whereever/you/downloaded/this/95-keymap.rules /lib/udev/rules.d/

then unplug/replug the keyboard (or reboot), and check with keymap -i that the keys work properly?

Thank you!

Revision history for this message
Dominik Boehi (dboehi) wrote :

All the keys work with the new rules.

Revision history for this message
Martin Pitt (pitti) wrote :
Changed in udev (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Dominik Boehi (dboehi) wrote :

Well, this is rather embarrassing...

I must have missed something when checking the new rules file, because I now tested it again, and it didn't work.

Here's an modified version of the code which checks for the usb keyboard, and with this one, it works.

SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p", GOTO="keyboard_usbcheck"

Sorry for this.

Changed in udev (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I changed upstream trunk to

  SUBSYSTEMS=="usb", ENV{ID_VENDOR}=="", IMPORT{program}="usb_id --export %p", GOTO="keyboard_usbcheck"

i. e. replaced ENV{ID_MODEL} with ENV{ID_VENDOR}. Please yell here if that does not work. (Your version is too eager and inefficient).

Thanks!

Changed in udev (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Dominik Boehi (dboehi) wrote :

The new rule didn't work.

SUBSYSTEMS=="usb", ENV{ID_MODEL}=="USB_Multimedia_Keyboard", IMPORT{program}="usb_id --export %p", GOTO="keyboard_usbcheck"

That's a version which works, and I hope is reasonably efficient.

Revision history for this message
Martin Pitt (pitti) wrote :

This rule does not make much sense, though. (ID_MODEL comes from usb_id, thus calling it after querying ID_MODEL is redundant). I also don't know which of the two lines fails now. Please reset your rules file to

[...]
SUBSYSTEMS=="usb", ENV{ID_VENDOR}=="", IMPORT{program}="usb_id --export %p", GOTO="keyboard_usbcheck"
[...]
ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave"
[...]

then unplug the keyboard, run

  udevadm monitor -e --udev

plug it in, and then press control-c and copy&paste the output here.

Revision history for this message
Martin Pitt (pitti) wrote :

Sorry, this was a "brown paperbag" bug from my side. I unbroke the rule and committed it upstream. I attach the full rule file for your convenience.

Please note that I renamed the keymap file to "logitech-wave" to be more consistent with the other keymap files, so please either rename your's as well, or change the name in the rule file.

Thanks!

Revision history for this message
Dominik Boehi (dboehi) wrote :

The fixed rule file works.

Thanks for your effort to fix this bug.

Revision history for this message
Jonas Norlander (jonorland) wrote :

I just installed Karmic beta and want to help test this. Is it possible and how would i do that?

Revision history for this message
Dominik Boehi (dboehi) wrote :

Great that you want to test this.

First you have to download the attached logitech-wave file.
Then, copy it with the following command:

sudo cp /your/download/location/logitech-wave /lib/udev/keymaps/

Then, download the fixed rules file Martin posted earlier and copy it:

sudo cp /your/download/location/95-keymap.rules /lib/udev/rules.d/

After that, unplug your keyboard and plug it in again.

Then you can run

sudo /lib/udev/keymap -i input/event6

and press all the special keys and check that a correct key code (some word, and not just a number) is shown, i.e.:

scan code: 0x9001C key code: scale

Revision history for this message
Jonas Norlander (jonorland) wrote :

For some reason it don't work for me. I have double checked that i got the right files and in the right place and I have tested from a console under KDE and when started in recover mode.
jonas@Tor:~$ /lib/udev/findkeyboards
USB keyboard: input/event3 (I only got one keyboard so this is some error)
USB keyboard: input/event5

sudo /lib/udev/keymap -i input/event5
Under KDE I only got a result for the normal keys and some of the Fn+fx keys that did "work" before. In the recovery mode i get ^@ for the Fn+fx keys and nothing for the other special keys like zoom, pictures and music.

How should I proceed?

Revision history for this message
Dominik Boehi (dboehi) wrote :

You have to run

sudo /lib/udev/keymap -i input/event6

findkeyboards doesn't show this, but the wave keyboard is represented as two devices in linux. the one that findkeyboards shows is just for the normal keys. then there's another one, which is just for the special keys.

Just a short question:

Do you have the cordless keyboard or the normal one?

Revision history for this message
Jonas Norlander (jonorland) wrote :

I have a cordless keyboard and mouse bought together using same receiver.
Why event6? I have this input devices after disconnecting all other but the logitech keyboard and mouse:

jonas@Tor:~$ ls /dev/input/
by-id by-path event0 event1 event2 event5 event6 event7 mice mouse0 mouse1

jonas@Tor:~$ ls -l /dev/input/by-id/
totalt 0
lrwxrwxrwx 1 root root 9 2009-10-12 22:47 usb-Logitech_USB_Receiver-event-kbd -> ../event5
lrwxrwxrwx 1 root root 9 2009-10-12 12:23 usb-Logitech_USB_Receiver-event-mouse -> ../event6
lrwxrwxrwx 1 root root 9 2009-10-12 12:23 usb-Logitech_USB_Receiver-mouse -> ../mouse1

Does it matter if i run under X Window/KDE?

Running keymap with event6 I get some result. I report back when i have tested and written down the results.

Revision history for this message
Dominik Boehi (dboehi) wrote :

I think the difference is that I use the corded keyboard and you the cordless one.

With the corded keyboard:

dominik@d-karmic:~$ ls -l /dev/input/by-id/
insgesamt 0
lrwxrwxrwx 1 root root 9 2009-10-12 20:27 usb-Logitech_USB_Multimedia_Keyboard-event-if01 -> ../event6
lrwxrwxrwx 1 root root 9 2009-10-12 20:27 usb-Logitech_USB_Multimedia_Keyboard-event-kbd -> ../event5

and all the special keys are on ../event6.

I guess the rule doesn't apply to your keyboard for some reason, because it's cordless.

Please upload the result of

sudo udevadm info --export-db > udev-db.txt

then I can try to adapt the rule.

Revision history for this message
Jonas Norlander (jonorland) wrote :

Ok! Here comes the result of "sudo /lib/udev/keymap -i input/event6" running under KDE with my Logitech Wave Cordless Swedish/Nordic layout with the "fixes" from above.
To see how the Fn keys looks on this keyboard look at the picture on http://www.logitech.com/index.cfm/67/529&cl=us,en The other picture there is not how my keyboard look.

I have verified the result and the Camera key do report audio, Music and media center do have same scan code etc.

Revision history for this message
Jonas Norlander (jonorland) wrote :

And here comes the result of "sudo udevadm info --export-db > udev-db.txt".
Thanks for the help.

Revision history for this message
Martin Pitt (pitti) wrote :

Dominik Boehi [2009-10-12 21:43 -0000]:
> lrwxrwxrwx 1 root root 9 2009-10-12 20:27 usb-Logitech_USB_Multimedia_Keyboard-event-if01 -> ../event6
> lrwxrwxrwx 1 root root 9 2009-10-12 20:27 usb-Logitech_USB_Multimedia_Keyboard-event-kbd -> ../event5

For your interest, the assignment of eventN is not fixed in any
predictable way. They are just enumerated in order of detection. You
need to use "sudo lsinput" to find out which particular device has
which number, or look at the udevadm info --export-db output.

Revision history for this message
Martin Pitt (pitti) wrote :

Jonas Norlander [2009-10-12 22:00 -0000]:
> Ok! Here comes the result of "sudo /lib/udev/keymap -i input/event6"
> running under KDE with my Logitech Wave Cordless Swedish/Nordic
> layout with the "fixes" from above.

This looks mostly ok? You can try listening on the other event devices
to see if there's by any chance another device which has the "Gadgets"
and "Battery" keys.

Martin

Revision history for this message
Jonas Norlander (jonorland) wrote :

Ok so most of the keys gives some result as seen when I use the keymap tool but how can I use them in KDE?
Are there a way so i can remap the scan codes i got so i perhaps can use them?

Revision history for this message
Martin Pitt (pitti) wrote :

Jonas Norlander [2009-10-14 10:00 -0000]:
> Ok so most of the keys gives some result as seen when I use the
> keymap tool but how can I use them in KDE?

You can't, see comment 35.

> Are there a way so i can remap the scan codes i got so i perhaps can use them?

You can change the keymap to only use key symbols < 256, see
/usr/include/linux/input.h

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Jonas Norlander (jonorland) wrote : Re: [Bug 215035] Re: Many special keys on Logitech Wave keyboard don't work

On Wed, Oct 14, 2009 at 12:27 PM, Martin Pitt <email address hidden> wrote:
> Jonas Norlander [2009-10-14 10:00 -0000]:
>> Ok so most of the keys gives some result as seen when I use the
>> keymap tool but how can I use them in KDE?
>
> You can't, see comment 35.

I know X cant use key codes > 255. What I meant was isn't there a way
can I remap them so for example the Wordprocessor key report
wordprocessor and not battery?

Revision history for this message
Martin Pitt (pitti) wrote :

Oops, sorry, should have looked more closely. Jonas, I don't think that the current udev rule even matches for you, since in your udev dump I don't see "Logitech USB Multimedia Keyboard". I suppose for you the rule needs to look like

  ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="USB Receiver", RUN+="keymap $name logitech-wave-cordless"

and you need to create a new /lib/udev/keymaps/logitech-wave-cordless file which looks structurally like Dominik's file, but using the scan codes you determined in http://launchpadlibrarian.net/33562506/Logitech.Wave-keymap.test.txt . Please note that you only need to include the keys which are wrong (like wordprocessor), and not the ones which are already correct.

Could you try this?

Revision history for this message
Jonas Norlander (jonorland) wrote :

On Wed, Oct 14, 2009 at 9:20 PM, Martin Pitt <email address hidden> wrote:
> Oops, sorry, should have looked more closely. Jonas, I don't think that
> the current udev rule even matches for you, since in your udev dump I
> don't see "Logitech USB Multimedia Keyboard". I suppose for you the rule
> needs to look like
>
>  ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="USB Receiver", RUN+="keymap
> $name logitech-wave-cordless"
>
> and you need to create a new /lib/udev/keymaps/logitech-wave-cordless
> file which looks structurally like Dominik's file, but using the scan
> codes you determined in http://launchpadlibrarian.net/33562506/Logitech
> .Wave-keymap.test.txt . Please note that you only need to include the
> keys which are wrong (like wordprocessor), and not the ones which are
> already correct.
>
> Could you try this?
>

Can I add the above udev rule just below the one in 95-keymap.rules or
should I replace it?
The "ATTRS{name}=="USB Receiver"" should that be
"ATTRS{name}=="Logitech USB Receiver"" as the "name" from lsinput
command?

/dev/input/event4
   bustype : BUS_USB
   vendor : 0x46d
   product : 0xc517
   version : 272
   name : "Logitech USB Receiver"
   phys : "usb-0000:00:02.1-1.2/input1"
   uniq : ""
   bits ev : EV_SYN EV_KEY EV_REL EV_ABS EV_MSC

I try this and report back.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 215035] Re: Many special keys on Logitech Wave keyboard don't work

Jonas Norlander [2009-10-14 19:40 -0000]:
> Can I add the above udev rule just below the one in 95-keymap.rules or
> should I replace it?

Just below is fine.

> The "ATTRS{name}=="USB Receiver"" should that be
> "ATTRS{name}=="Logitech USB Receiver"" as the "name" from lsinput
> command?

I'm not entirely sure; ATTRS{name} comes from sysfs, but the udev dump
just shows me the usb_id output. There it said "USB Receiver". Perhaps
just try with both and see which works? That's easier than going
through the long route of finding the sysfs path and using
udevadm info --attribute-walk /devices... (but you can do that as
well, of course).

> I try this and report back.

Thanks!

Revision history for this message
Jonas Norlander (jonorland) wrote :

Done!
Lets see what we got... ATTRS{name}=="Logitech USB Receiver" looks to be the one to use.
Most of the keys works with keymap and reports the "right" key. Keys that don't report anything is:
Switch window, Gadgets and Battery (i don't think battery sends a keys. What it do is report the battery status with a led on the keyboard).
Music and Media Center keys both report same scan code maped to media.
Some of the keys in X that did report a key before (but wrong) don't give anything now, but i guess this is the right way to go anyway?

I attach the files I have edited and using now.

Revision history for this message
Jonas Norlander (jonorland) wrote :

And the keymap...

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks, Jonas. Pushed to upstream git trunk (0ddfae5)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udev - 147-1

---------------
udev (147-1) lucid; urgency=low

  * Update to 147 release:
    - Includes previous GIT updates.
    - udev-acl now requires ConsoleKit 0.4.1
    - gudev API no longer marked as experimental
    - rules updates. LP: #281335, #215035, #438114.

  * Added Build-Depends on gobject-introspection, libgirepository1.0-dev
    and gir1.0-glib-2.0.
  * Add gir1.0-gudev-1.0 package with introspection data.
  * Added Breaks on consolekit << 0.4.1
  * Add missing copyright files for the libudev and libgudev packages
    which are LGPL 2.1+ and LGPL 2+ respectively, not GPL 2+.

  * Include symbols files and update shlibs to 147. LP: #427672.
 -- Scott James Remnant <email address hidden> Mon, 30 Nov 2009 22:37:34 +0000

Changed in udev (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Spider (spider-alternating) wrote :

Package: udev
Priority: important
Section: admin
Installed-Size: 1540
Maintainer: Scott James Remnant <email address hidden>
Architecture: amd64
Version: 147~-6

Still not having my Window Zoom keys recognized on a Logitech Wave (Corded version) keyboard.

Attached are udevadm monitor -e --udev, and udevadm info --export-db

Revision history for this message
Spider (spider-alternating) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Spider,

Please run /lib/udev/findkeyboards to find the eventX number of your Logitech keyboard. Then do

  sudo udevadm test /sys/class/input/eventX

(with X being replaced with the particular input device number, such as "event7") and copy&paste the entire output here.

Revision history for this message
Jerone Young (jerone) wrote :

@Spider
       This could be a general issue. Seems that the Windows Zoom button on Lenovo Thinkpads is having the same issue. They are seen and mapped correctly by udev. But no keypress is seen for just the "zoom" press.

Revision history for this message
alpha-centauri (ubuntu-alexander-becker-privat) wrote :

Hello,

so will there be a fix for this problem?

Revision history for this message
Martin Pitt (pitti) wrote :

alpha-centauri,

this problem is already fixed (in lucid, anyway).

Revision history for this message
mike (donotaskwhoiam) wrote :

Martin Pitt wrote on 2010-01-11: #70

alpha-centauri,

this problem is already fixed (in lucid, anyway).

---------------------------------

You mean all the extra keys are working on 10.04? I am using it now, can you please let me know how to figure it?

I have only a few extra keys working. :)

Revision history for this message
Martin Pitt (pitti) wrote :

Mike,

please open a new report when you have trouble with your keyboard (with "ubuntu-bug udev"), and follow /usr/share/doc/udev/README.keymap.txt.gz to find out the missing scan codes. Thanks!

Revision history for this message
Alexander Artyukhin (alexander-artyukhin-name) wrote :

This is my keymap for wireless wave version. All looks fine, but music button and media centre button have same scancode 0xC0183, gadget/widget buttun have no any scancode. I'm using ubuntu 10.10. With out of the box version buttons are mapped incorrect and I do not understand why I have correct mapping with my keymap (exept music/media and gadget buttons) because I do not edit udev rules.

Revision history for this message
David Mansfield (ubuntu-dm) wrote :

fyi, mostly for those who get here frustrated via google:

just checked this out. the "current" (just checked the git tree on kernel.org) map for the _cordless_ wave is incorrect. the one in comment#73 is correct. see also comment#51. these comments show different scancodes than what is in the keymap file in upstream git and in many distributions (not sure about ubuntu ;-)

i have also verified my codes are the same in comment#73 and I have a logitech cordless wave.

Tyron (tuffgong47)
Changed in udev (Ubuntu):
assignee: Martin Pitt (pitti) → Tyron (tuffgong47)
Martin Pitt (pitti)
Changed in udev (Ubuntu):
assignee: Tyron (tuffgong47) → Martin Pitt (pitti)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.