[keymap] Logitech iTouch keyboard: broken scan codes

Bug #1152377 reported by Götz Christ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Summary: The hot key buttons, Finance, My Sites, Community, Shopping and iTouch performs no actions.

This is a Logitech keyboard (with 5 broken scan codes) named "iTouch Internet Navigator".

from dmesg:
[30348.486903] atkbd serio0: Use 'setkeycodes e013 <keycode>' to make it known.
[30348.643289] atkbd serio0: Unknown key released (translated set 2, code 0x93 on isa0060/serio0).
[30348.643297] atkbd serio0: Use 'setkeycodes e013 <keycode>' to make it known.
[30348.940755] atkbd serio0: Unknown key pressed (translated set 2, code 0x94 on isa0060/serio0).
[30348.940763] atkbd serio0: Use 'setkeycodes e014 <keycode>' to make it known.
[30349.123219] atkbd serio0: Unknown key released (translated set 2, code 0x94 on isa0060/serio0).
[30349.123227] atkbd serio0: Use 'setkeycodes e014 <keycode>' to make it known.
[30349.387002] atkbd serio0: Unknown key pressed (translated set 2, code 0x95 on isa0060/serio0).
[30349.387010] atkbd serio0: Use 'setkeycodes e015 <keycode>' to make it known.
[30349.577190] atkbd serio0: Unknown key released (translated set 2, code 0x95 on isa0060/serio0).
[30349.577198] atkbd serio0: Use 'setkeycodes e015 <keycode>' to make it known.
[30353.702014] atkbd serio0: Unknown key pressed (translated set 2, code 0x91 on isa0060/serio0).
[30353.702023] atkbd serio0: Use 'setkeycodes e011 <keycode>' to make it known.
[30353.852167] atkbd serio0: Unknown key released (translated set 2, code 0x91 on isa0060/serio0).
[30353.852173] atkbd serio0: Use 'setkeycodes e011 <keycode>' to make it known.
[30354.381783] atkbd serio0: Unknown key pressed (translated set 2, code 0x92 on isa0060/serio0).
[30354.381791] atkbd serio0: Use 'setkeycodes e012 <keycode>' to make it known.
[30354.538307] atkbd serio0: Unknown key released (translated set 2, code 0x92 on isa0060/serio0).
[30354.538315] atkbd serio0: Use 'setkeycodes e012 <keycode>' to make it known.

After running the following commands, I found out the corresponding functionalities:

$ /usr/lib/udev/findkeyboards
AT keyboard: input/event2

$ sudo /usr/lib/udev/keymap -i input/event2
0x91 shop # Shopping
0x92 config # iTouch
0x93 finance # Finance
0x94 prog1 # My Sites
0x95 prog2 # Community

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

Is this an USB keyboard? If so, can you please run

  udevadm info --export-db > /tmp/udev.txt

and attach /tmp/udev.txt here? This will give me precise information to fix this. Thank you!

tags: added: keymap
affects: udev (Ubuntu) → systemd (Ubuntu)
Changed in systemd (Ubuntu):
status: New → Incomplete
Martin Pitt (pitti)
summary: - Logitech iTouch keyboard broken scan codes
+ [keymap] Logitech iTouch keyboard: broken scan codes
Revision history for this message
Götz Christ (g-christ) wrote :

Of course, udev.txt attached.

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

I think the "My Sites" key should become KEY_BOOKMARKS, that seems to fit better?

To verify that I got the model matching correct, could you please download this 95-keymap.rules file attachment to /tmp, and install it with

  sudo cp /tmp/95-keymap.rules /lib/udev/rules.d/

and then either unplug/replug your keyboard or reboot? The five keys should have the associated meaning now.

Thank you!

Revision history for this message
Götz Christ (g-christ) wrote :

(There is already a "Favorites" key, which I think matches better with KEY_BOOKMARKS).

Nothing changes with the replaced 95-keymap.rules file, when the keyboard is connected with USB, without or with the replaced file (and unplug/replug the keyboard). The behavior is different than when connected with the USB to PS/2 adapter. There is an odd behavior, "finance" brings the context menu, "config" pastes the clip board content, "shop" does a left mouse click, some old keys which work with PS/2, like "Media", don't work direct with USB.

I can match the keys with PS/2, using for example:
  $ sudo /lib/udev/keymap input/event2 0x93 finance

But when connected with USB:
  $ sudo /lib/udev/keymap input/event3 0x93 finance
  EVIOCSKEYCODE: Invalid argument
  setting scancode 0x93 to key code 219 failed

Also, when using "sudo /usr/lib/udev/keymap -i input/event3" (USB connection) it doesn't show the scan codes (e.g. the context menu appears), it only does when connected with PS/2. I'm not sure what to do.

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

> Also, when using "sudo /usr/lib/udev/keymap -i input/event3" (USB connection) it doesn't show the scan codes (e.g. the context menu appears),

Supposedly input/event3 is not the right device then. You can either find the right one based on names and type from "udevadm info --export-db | less", or just try each input/event1, 2, 3, etc. until you hit the right one.

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

OK, once you find the right device (for USB mode, not PS/2), and see the right scan codes (with wrong key codes), can you please give me the output of

  udevadm info --attribute-walk /dev/input/event3

(or whichever eventN it is)? Unfortunately your previous udev.txt attachment only has the udev properties, not the attributes (was my fault,sorry).

Thanks!

Revision history for this message
Götz Christ (g-christ) wrote :

You are right, I was using the wrong event device. The output of findkeyboards gives:
  $ /lib/udev/findkeyboards
  USB keyboard: input/event3

But there are two devices for the keyboard:
  $ sudo /lib/udev/keymap input/event3
  ### evdev 1.0.1., driver 'Logitech Logitech USB Keyboard'

  $ sudo /lib/udev/keymap input/event4
  ### evdev 1.0.1., driver 'Logitech Logitech USB Keyboard'

Anyway, using "/usr/lib/udev/keymap -i input/event4", I get:
scan code: 0x90001 key code: 100
scan code: 0x90002 key code: 101
scan code: 0x90003 key code: 102
scan code: 0x90004 key code: 103
scan code: 0x90005 key code: 104

And the "Media" key is wrongly assigned to config
scan code: 0xC0183 key code: config

So, the correct key codes should be:
0x90001 shop # Shopping
0x90002 config # iTouch
0x90003 finance # Finance
0x90004 prog1 # My Sites
0x90005 prog2 # Community
0xC0183 media # Media

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

> ATTRS{name}=="Logitech Logitech USB Keyboard"

Ah, so the name was duplicated there, that's why it didn't match. And the scan codes were wrong.

Can you please confirm that this updated rules file works now?

Thank you!

Revision history for this message
Götz Christ (g-christ) wrote :

The new rules work as expected!

Thank you very much Martin!

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

Splendid! I committed the final version (with separate keymap file) upstream:
http://cgit.freedesktop.org/systemd/systemd/commit/?id=98627dce

Changed in systemd (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 204-0ubuntu5

---------------
systemd (204-0ubuntu5) saucy; urgency=low

  * Add 0000-upstream-keymaps.patch: Backport latest keymap fixes from
    upstream, as we won't be able to update to newer upstream releases anytime
    soon. (LP: #1193147, #1157334, #1152377, #1012365, #727139)
  * Refresh our patches to apply cleanly.
 -- Martin Pitt <email address hidden> Fri, 05 Jul 2013 08:54:06 +0200

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
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.