KEY_SETUP and KEY_F22 do not produce X.org key event

Bug #327554 reported by Fred
6
Affects Status Importance Assigned to Milestone
xkeyboard-config (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: hal-info

Following the instructions found in here: https://wiki.ubuntu.com/Hotkeys/Troubleshooting

Using Jaunty alpha 4 with all available updates.

On my laptop Acer TravelMate 6292, the keys Fn+F7 and Fn+F2 has no keysym.
Here is the output of xev when I pressed Fn+F7:
keycode 200 = (keysym 0x0, NoSymbol), state = 0x10
and when I pressed Fn+F2:
keycode 149 = (keysym 0x0, NoSymbol), state = 0x10

Here is the output of sudo input-events 5 for each key :
Fn+F7
11:13:04.236277: EV_MSC code=4 value=241
11:13:04.236299: EV_KEY KEY_F22 (0xc0) pressed
11:13:04.236305: EV_SYN code=0 value=0
11:13:04.321242: EV_MSC code=4 value=241
11:13:04.321263: EV_KEY KEY_F22 (0xc0) released
11:13:04.321268: EV_SYN code=0 value=0

Fn+F2
11:13:00.400665: EV_MSC code=4 value=166
11:13:00.400699: EV_KEY KEY_SETUP (0x8d) pressed
11:13:00.400705: EV_SYN code=0 value=0
11:13:00.520776: EV_MSC code=4 value=166
11:13:00.520802: EV_KEY KEY_SETUP (0x8d) released
11:13:00.520806: EV_SYN code=0 value=0

Other informations:
$ lshal |grep system.hardware
  system.hardware.primary_video.product = 10754 (0x2a02) (int)
  system.hardware.primary_video.vendor = 32902 (0x8086) (int)
  system.hardware.product = 'TravelMate 6292' (string)
  system.hardware.serial = 'LXTG60Z17172503E092500' (string)
  system.hardware.uuid = '605A42E7-A155-D711-B55A-001B244AE924' (string)
  system.hardware.vendor = 'Acer, inc.' (string)
  system.hardware.version = 'Not Applicable' (string)

$ setxkbmap -print
xkb_keymap {
 xkb_keycodes { include "evdev+aliases(azerty)" };
 xkb_types { include "complete" };
 xkb_compat { include "complete" };
 xkb_symbols { include "pc+fr(oss)+inet(evdev)" };
 xkb_geometry { include "pc(pc105)" };
};

Tags: jaunty
Revision history for this message
Fred (frederic-lespez) wrote :
Revision history for this message
Fred (frederic-lespez) wrote :

Sorry I have completely forgot to give the purpose of each key.

Fn+F7 key should enable/disable the touchpad
Fn+F2 key launch under Windows the Acer eSettings. Under Linux, may be it should launch the Gnome Control Center ?

I am currently fiddling with fdi file and in particular this one :
/usr/share/hal/fdi/information/10freedesktop/30-keymap-acer.fdi

But I am missing one point : Where do you get the scancode of a key ?

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

> 11:13:04.236277: EV_MSC code=4 value=241

The "241" is the scancode. That, minus 128, plus E000 needs to go into the fdi (i. e. e071 for this key)

Revision history for this message
Fred (frederic-lespez) wrote :

Hi Martin,
Thanks a lot for your explanation !
I'll work on a patch for this one.

Revision history for this message
Fred (frederic-lespez) wrote :

Martin,

There is something I don't understand.
According to the output of sudo input-events 5 and thanks to your explanation, I thought I just needed to add the following line to /usr/share/hal/fdi/information/10freedesktop/30-keymap-acer.fdi :
<append key="input.keymap.data" type="strlist">e071:f22</append> <!-- Fn+F7 Touchpad toggle (off-to-on) -->
<append key="input.keymap.data" type="strlist">e026:setup</append> <!-- Fn+F2 Acer eSettings -->

The problem is : these lines are already in the fdi file (and they are "active" in my setup) but xev still says that :
keycode 200 = (keysym 0x0, NoSymbol), state = 0x10
keycode 149 = (keysym 0x0, NoSymbol), state = 0x10
I thought that the whole point of these fdi lines was to associate scancodes with keysym ?
Did I miss something ?

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

Ah, so you *do* see KEY_SETUP and KEY_F22 already if you switch to a VT and do input-events on your keyboard? If you do, then the hal-info mappings are alright, and the X.org -evdev driver doesn't translate them into proper X.org key names. If you don't see them, then the existing hal-info mappings seem to not match your laptop model.

I checked both key codes, and both are < 256, so it is possible for X.org to handle those keys properly.

Changed in hal-info:
status: New → Incomplete
Revision history for this message
Fred (frederic-lespez) wrote :

If I switch to a VT and do input-events on my keyboard, here is what I see:
$ sudo input-events 5
/dev/input/event5
   bustype : BUS_I8042
   vendor : 0x1
   product : 0x1
   version : 43841
   name : "AT Translated Set 2 keyboard"
   phys : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP
19:14:28.151030: EV_MSC code=4 value=166
19:14:28.151040: EV_KEY KEY_SETUP (0x8d) released
19:14:28.151044: EV_SYN code=0 value=0
19:14:28.421302: EV_MSC code=4 value=166
19:14:28.421312: EV_KEY KEY_SETUP (0x8d) pressed
19:14:28.421318: EV_SYN code=0 value=0
19:14:28.501375: EV_MSC code=4 value=166
19:14:28.501383: EV_KEY KEY_SETUP (0x8d) released
19:14:28.501388: EV_SYN code=0 value=0
19:14:28.651524: EV_MSC code=4 value=166
19:14:28.651535: EV_KEY KEY_SETUP (0x8d) pressed
19:14:28.651540: EV_SYN code=0 value=0
19:14:30.228334: EV_SYN code=0 value=0
19:14:30.954779: EV_MSC code=4 value=241
19:14:30.954792: EV_KEY KEY_F22 (0xc0) pressed
19:14:30.954798: EV_SYN code=0 value=0
19:14:31.065017: EV_MSC code=4 value=241
19:14:31.065026: EV_KEY KEY_F22 (0xc0) released
19:14:31.065030: EV_SYN code=0 value=0
19:14:31.190122: EV_MSC code=4 value=242
19:14:31.190134: EV_KEY KEY_F22 (0xc0) pressed
19:14:31.190139: EV_SYN code=0 value=0
19:14:31.280203: EV_MSC code=4 value=242
19:14:31.280212: EV_KEY KEY_F22 (0xc0) released
19:14:31.280217: EV_SYN code=0 value=0

So I *do* see them ! The F22 has to scancodes e071 and e072 but I think it is normal since it is a toggle key (turn on and off touchpad).
So: is it a problem with X.org -evdev driver ?
I am going to read more documentation :-)

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

Indeed that seems to be the case then. Reassigning.

Changed in hal-info:
status: Incomplete → New
Revision history for this message
Fred (frederic-lespez) wrote :

Same behavior under Karmic alpha 3.

Bryce Harrington (bryce)
tags: added: jaunty
Timo Aaltonen (tjaalton)
affects: xserver-xorg-input-evdev (Ubuntu) → xkeyboard-config (Ubuntu)
Revision history for this message
Simos Xenitellis  (simosx) wrote :

Fred, thanks for the report.

Now Linux uses 'udev' instead of 'hal' to handle those keys.
The files you need to edit are now located at
/lib/udev/keymaps/

If you see in /lib/udev/keymaps/acer
there are references for

0xA6 setup # Fn+F2 Acer eSettings
0xF1 f22 # Fn+F7 Touchpad toggle (off-to-on)
0xF2 f22 # Fn+F7 Touchpad toggle (on-to-off)

which means that pressing now those keys, the default actions for 'setup' and 'f22' will be invoked.

Please verify whether the bug has been fixed in Ubuntu 10.04. If not, open this report.
The upstream location to fix this issue is at https://bugzilla.kernel.org/

Changed in xkeyboard-config (Ubuntu):
status: New → Invalid
Revision history for this message
Fred (frederic-lespez) wrote :

Hi Simos,

Fn+F7 works like a charm in Lucid.
But It seems that nothing has changed for Fn+F2.
Here is xev output :
keycode 149 = (keysym 0x0, NoSymbol), state = 0x10
keycode 149 = (keysym 0x0, NoSymbol), state = 0x10

And here is input-events' one :
21:32:05.872828: EV_SYN code=0 value=0
21:32:10.647050: EV_MSC code=4 value=166
21:32:10.647071: EV_KEY KEY_SETUP (0x8d) pressed
21:32:10.647077: EV_SYN code=0 value=0
21:32:10.757153: EV_MSC code=4 value=166
21:32:10.757168: EV_KEY KEY_SETUP (0x8d) released

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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