Bug 210881

Summary: switch to microsoft multimedia keyboard layout by default
Product: [openSUSE] openSUSE 11.0 Reporter: Dirk Mueller <dmueller>
Component: SaX2Assignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <sax2-maintainer-bugs>
Severity: Enhancement    
Priority: P3 - Medium CC: forgotten_eSTct29jGv, sndirsch
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dirk Mueller 2006-10-07 11:18:49 UTC
Hi, 

in order to properly (without xmodmap hacks) support laptop keys by default, sax2 has to configure the keyboard map to the microsoft multimedia layout. It would be nice if it would do that by default in all cases that make sense (e.g. even non-laptop installations with keyboards that could possibly be such a layout) to make multimedia/laptop keys work on as many machines as possible. 

the current xmodmap hack is the file

 in /usr/share/hotkey-setup/hotkey-setup.xmodmap

I would like to get rid of that.
Comment 1 Marcus Schaefer 2006-10-09 07:37:41 UTC
if you don't mind send me the information of

     hwinfo --keyboard

I will try to add a mapping based on the vendor/device id like I do
for mice as well
Comment 2 Will Stephenson 2006-10-09 09:06:08 UTC
hwinfo --keyboard for HP Pavilin zt3000

19: PS/2 00.0: 10800 Keyboard
  [Created at input.139]
  UDI: /org/freedesktop/Hal/devices/platform_i8042_i8042_Kbd_Port_logicaldev_input
  Unique ID: EXC1.TBWTwSuMeW2
  Hardware Class: keyboard
  Model: "AT Translated Set 2 keyboard"
  Vendor: int 0x0211
  Device: int 0x0001 "AT Translated Set 2 keyboard"
  Device File: /dev/input/event1
  Device Files: /dev/input/event1, /dev/input/by-path/platform-i8042-serio-4-event-kbd
  Device Number: char 13:65
  Driver Info #0:
    XkbRules: xfree86
    XkbModel: pc104
  Config Status: cfg=new, avail=yes, need=no, active=unknown
Comment 3 Dirk Mueller 2006-10-09 09:07:10 UTC
hwinfo for Microsoft natural multimedia keyboard: 

22: PS/2 00.0: 10800 Keyboard
  [Created at input.139]
  UDI: /org/freedesktop/Hal/devices/platform_i8042_i8042_Kbd_Port_logicaldev_input
  Unique ID: EXC1.TBWTwSuMeW2
  Hardware Class: keyboard
  Model: "AT Translated Set 2 keyboard"
  Vendor: int 0x0211
  Device: int 0x0001 "AT Translated Set 2 keyboard"
  Device File: /dev/input/event1
  Device Files: /dev/input/event1, /dev/input/by-path/platform-i8042-serio-1-event-kbd
  Device Number: char 13:65
  Driver Info #0:
    XkbRules: xfree86
    XkbModel: pc104
  Config Status: cfg=new, avail=yes, need=no, active=unknown
Comment 4 Will Stephenson 2006-10-09 09:08:19 UTC
  
hwinfo --keyboard for Logitech Access Keyboard

wstephenson@coquet:~> /usr/sbin/hwinfo --keyboard
20: PS/2 00.0: 10800 Keyboard
  [Created at input.139]
  UDI: /org/freedesktop/Hal/devices/platform_i8042_i8042_Kbd_Port_logicaldev_input
  Unique ID: EXC1.TBWTwSuMeW2
  Hardware Class: keyboard
  Model: "AT Translated Set 2 keyboard"
  Vendor: int 0x0211
  Device: int 0x0001 "AT Translated Set 2 keyboard"
  Device File: /dev/input/event1
  Device Number: char 13:65
  Driver Info #0:
    XkbRules: xfree86
    XkbModel: pc104
  Config Status: cfg=no, avail=yes, need=no, active=unknown
w
Comment 5 Dirk Mueller 2006-10-09 09:08:34 UTC
hwinfo for samsung x20 laptop

17: PS/2 00.0: 10800 Keyboard
  [Created at input.139]
  UDI: /org/freedesktop/Hal/devices/platform_i8042_i8042_Kbd_Port_logicaldev_input
  Unique ID: EXC1.TBWTwSuMeW2
  Hardware Class: keyboard
  Model: "AT Translated Set 2 keyboard"
  Vendor: int 0x0211
  Device: int 0x0001 "AT Translated Set 2 keyboard"
  Device File: /dev/input/event1
  Device Files: /dev/input/event1, /dev/input/by-path/platform-i8042-serio-4-event-kbd
  Device Number: char 13:65
  Driver Info #0:
    XkbRules: xfree86
    XkbModel: pc104
  Config Status: cfg=yes, avail=yes, need=yes, active=unknown
Comment 6 Stephan Binner 2006-10-09 09:12:48 UTC
hwinfo for Medion kbr0108 

22: USB 00.0: 10800 Keyboard
  [Created at usb.122]
  UDI: /org/freedesktop/Hal/devices/usb_device_4f2_200_noserial_if0_logicaldev_input
  Unique ID: FKGF.+_k5c6xmAsC
  Parent ID: pBe4.fGtEn4pQAv3
  SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0
  SysFS BusID: 2-1:1.0
  Hardware Class: keyboard
  Model: "Chicony Electronics USB Wireless HID Receiver"
  Hotplug: USB
  Vendor: usb 0x04f2 "Chicony Electronics Co., Ltd."
  Device: usb 0x0200 "USB Wireless HID Receiver"
  Revision: "0.03"
  Driver: "usbhid"
  Driver Modules: "usbhid"
  Device File: /dev/input/event1
  Device Files: /dev/input/event1, /dev/input/by-id/usb-Chicony_USB_Wireless_HID_Receiver-event-kbd, /dev/input/by-path/pci-0000:00:1d.0-usb-0:1:1.0-event-kbd
  Device Number: char 13:65
  Speed: 1.5 Mbps
  Module Alias: "usb:v04F2p0200d0003dc00dsc00dp00ic03isc01ip01"
  Driver Info #0:
    XkbRules: xfree86
    XkbModel: pc104
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #17 (Hub)
Comment 7 Will Stephenson 2006-10-09 09:14:37 UTC
Cherry linux keyboard

will@emsig:~> /usr/sbin/hwinfo --keyboard
17: USB 00.0: 10800 Keyboard
  [Created at usb.123]
  Unique ID: PYMB.eZRaBnFeMl6
  Parent ID: zPk0.ONEN4TeEMyD
  SysFS ID: /devices/pci0000:00/0000:00:10.3/usb4/4-1/4-1:1.0
  SysFS BusID: 4-1:1.0
  Hardware Class: keyboard
  Model: "Cherry Mikroschalter Keyboard"
  Hotplug: USB
  Vendor: usb 0x046a "Cherry Mikroschalter GmbH"
  Device: usb 0x0023
  Revision: "0.32"
  Driver: "usbhid"
  Device File: /dev/input/event1
  Device Number: char 13:65
  Speed: 1.5 Mbps
  Module Alias: "usb:v046Ap0023d0032dc00dsc00dp00ic03isc01ip01"
  Driver Info #0:
    XkbRules: xfree86
    XkbModel: pc104
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #16 (Hub)
Comment 8 Lubos Lunak 2006-10-09 09:24:50 UTC
No-idea-what-brand keyboard, something made in China :) :

21: PS/2 00.0: 10800 Keyboard
  [Created at input.137]
  UDI: /org/freedesktop/Hal/devices/platform_i8042_i8042_Kbd_Port_logicaldev_input
  Unique ID: nLyy.TBWTwSuMeW2
  Hardware Class: keyboard
  Model: "AT Translated Set 2 keyboard"
  Vendor: int 0x0211
  Device: int 0x0001 "AT Translated Set 2 keyboard"
  Device File: /dev/input/event0
  Device Number: char 13:64
  Driver Info #0:
    XkbRules: xfree86
    XkbModel: pc104
  Config Status: cfg=new, avail=yes, need=no, active=unknown
Comment 9 Marcus Schaefer 2006-10-09 09:32:15 UTC
Thanks for all the information. I myself have a Microsoft Natural device
which I will add as well. Anyway there is a problem with PS/2 connected
devices. I'm sorry but such keyboards are not "plug&play" ready which
means they don't answer to the escape sequence sent to the device.
Therefore any PS/2 connected devices are "AT Translated Set 2 keyboard"
which I cannot distinguish from a "normal keyboard" Currently I have the
following list:

  0x045e : 0x00db : microsoft   # Microsoft Natural Ergonomic Keyboard 4000
  0x04f2 : 0x0200 : chicony     # Chicony Electronics USB Wireless HID Receiver
  0x046a : 0x0023 : cherry      # Cherry Mikroschalter Keyboard

Problem is I don't know which XkbModel you are using for the keyboard
and which XKB options you activated. I use my Microsoft Natural keyboard
with "XkbModel" "microsoft" and it works as it should but for the other
devices I need your help

Thanks 
Comment 10 Marcus Schaefer 2006-10-10 09:23:49 UTC
ok, support for multimedia kbd setup has been added now. Currently only
my private keyboard has been added because I can test this hardware.
The Input.map contains among others:

   # Keyboards
   # Microsoft Natural Ergonomic Keyboard 4000
   # ---> is profile: microsoft-natural
   0x045e : 0x00db : microsoft-natural
   # Chicony Electronics USB Wireless HID Receiver
   # ---> is profile: no information yet
   0x04f2 : 0x0200 : <undefined>
   # Cherry Mikroschalter Keyboard
   # ---> is profile: no information yet
   0x046a : 0x0023 : <undefined>

If you want your keyboard to be part of this mapping table sent me
a working InputDevice section of your xorg.conf using a multimedia layout

Thanks
Comment 11 Dirk Mueller 2006-10-10 18:50:56 UTC
ok..
Comment 12 Dirk Mueller 2006-10-10 18:51:21 UTC
check which keyboardmodel works with the samsung x20
Comment 13 Lubos Lunak 2006-10-11 10:19:56 UTC
I may be just missing something, but what's the problem with simply defaulting to the multimedia model if there's no better choice? Currently we default to the pc104 model, which means there are missing key mappings for many keyboards. If we change the default to the multimedia model, the only difference should be that now some key mappings will be superfluous and unused, as far as I see. Having something superfluous and unused seems like a much better choice to me rather than missing something.
Comment 14 Marcus Schaefer 2006-10-11 13:37:55 UTC
If you call

   cat /usr/share/X11/xkb/symbols.dir | grep inet | wc -l

you'll find about 199 different multimedia descriptions. Which one of
them do you think is a usefull default ? I think none of them can act
as a default because especially internet/multimedia keyboards are very
different from each other. The only standard is pc104 for us based
layouts and from my perspective it is better to support the standard
well as guessing a multimedia default
Comment 15 Dirk Mueller 2006-10-11 14:03:27 UTC
the hotkey-setup during start will configure laptop key mappings to the microsoft natural keyboard mapping. thats why it should default to this mapping for those laptops (which were reported above as PS/2 AT keyboard iirc). 
Comment 16 Lubos Lunak 2006-10-11 14:15:57 UTC
I'd say that any of them is a useful default, because:
- pc104 has 0% chance of supporting the multimedia keys on a particular model,
while any of those has 0+% chance
- if I'm getting it right, the fallback plan is to go with
/usr/share/hotkey-setup/hotkey-setup.xmodmap, which does exactly the same, just
in a more hackish way

And in fact, the initial comment suggests which one to use as the default.

Where's the problem with what's said in comment #13 (worse problem than when
defaulting to pc104, that is)?
Comment 17 Marcus Schaefer 2006-10-16 13:45:46 UTC
well let's see how it works. I enabled the inet type "microsoft"
instead of pc105 for the console mappings of: de-lat*
Comment 18 Dirk Mueller 2006-11-11 23:29:44 UTC
hmm, that doesn't help anything. it should be "microsoftpro", because the microsoft model doesn't have any mapping for multimedia keys. 
Comment 19 Marcus Schaefer 2006-11-12 17:01:45 UTC
a bit late to mention don't you think ?
I will fix it
Comment 20 Marcus Schaefer 2006-11-13 14:36:44 UTC
fixed
Comment 21 Dirk Mueller 2006-11-15 16:01:59 UTC
I'm sorry, I haven't verified before :)
Comment 22 Lubos Lunak 2006-12-08 18:03:53 UTC
Guess what ... 10.2 here still defaults to the pc104 keyboard model (comment #8 has the hwinfo, not that I think it matters).
Comment 23 Dirk Mueller 2006-12-09 14:28:27 UTC
I can confirm the issue with my qemu test installations (which has a multimedia keyboard on the host computer). 
Comment 24 Marcus Schaefer 2006-12-11 09:14:16 UTC
I only changed that behavior for the mapping of the de-latin1-nodeadkeys
console keymap. If you have another keymap in your /etc/sysconfig/keyboard
the microsoftpro will not apply. That happens intentionally because I want
this enhancement to be tested in one environment first.

If you want the microsoftpro to be enabled for another console mapping
as well, test first then tell me and I will activate it. I'm sorry guys
but the expression "it works for me so change it globally" has been heart
very often and often has introduced major problems. That's why I'm carefully
with such changes especially if a keymap is assigned to a keyboard which
doesn't reference the correct hardware

You can check the mapping table yourself:

   /usr/share/sax/sysp/maps/Keyboard.map
Comment 25 Lubos Lunak 2006-12-11 10:10:07 UTC
You gotta be kidding. So we work on supporting multimedia keys nicely by default, but they actually don't work by default at all because of some very unlikely possibility of breakages that don't get really tested properly anyway during beta phase since they're enabled only for one layout (which, however, has it enabled even in final)? And that's "RESOLVED"?
Dirk: I guess we'll have to default to it ourselves in KDE setup.
Comment 26 Marcus Schaefer 2006-12-11 10:24:31 UTC
yes that's great cooperation. The possibility for testing has been
introduced on Mon Oct 16 14:01:35 CEST 2006, did you test it, you don't
I tested it and it works for me, do you activate anything globally
only because it works for you ? complaining after RC is simply too late
for 10.2 but it can be easily changed for 10.3... that's something you
don't want you are feeling offended and start kicking people who took
care, great cooperation, great style, do what you think you have to do

by the way the status is "resolved remind" this is different from
"resolved fixed" at least for me it is you can believe that or
forget it
Comment 27 Dirk Mueller 2006-12-11 10:43:17 UTC
How about submitting it *now* for 10.3 so that we can get testing coverage for the full alpha/beta cycle?
Comment 28 Marcus Schaefer 2006-12-11 10:55:42 UTC
done, changed it for all pc105/pc104 based keyboard types except
old atari based keyboards... they for sure doesn't provide any
internet keys. Package will be submitted tomorrow
Comment 29 Stephan Kulow 2008-06-25 09:10:32 UTC
mass reopening of later+remind bugs of 11.0
Comment 30 Marcus Schaefer 2008-06-25 09:58:07 UTC
this is done
Comment 31 Forgotten User eSTct29jGv 2008-09-09 13:51:07 UTC
Hello,

I'm reopening this bug, because 'pc102' keyboard types seem to have been forgotten during the move to 'microsoftpro' defaults. 'pc102' is still used for French keyboards (in my case, fr-latin1) and some others like Spanish, Italian, Hungarian in openSUSE 11.0 (in /usr/share/sax/sysp/maps/Keyboard.map)

I tried 'microsoftpro' and it works perfectly on my French keyboard, so I see no reason not to make this change here aswell, especially as many other languages are already using it in 11.0 and seem to have no problem.

If it's already done in Factory, then sorry for reopening this, but otherwise I think it's very important to do it before 11.1 because it caused much trouble with hotkeys in 11.0. Please see bug #398774 for an example and a detailed explanation (see my comment, number 25)
Comment 32 Stefan Dirsch 2008-09-09 14:46:34 UTC
I will change the default to microsoftpro also for fr*, es* and it*.
Comment 33 Stefan Dirsch 2008-09-10 00:53:26 UTC
fixed for factory.

sax2.changes:
-------------------------------------------------------------------
Wed Sep 10 02:45:51 CEST 2008 - sndirsch@suse.de

- make "microsoftpro" the default for all previous "pc101", "pc102"
  and "pc105" models (bnc #210881)