Support Word/Excel keys on Chicony KB-0350 keyboard

Bug #838760 reported by anatoly techtonik on 2011-09-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Undecided
Unassigned

Bug Description

Ubuntu 11.04 doesn't understand Word/Excel keys from Chicony KB-0350 keyboard when they are pressed in Keyboard Shortcuts application.

Using instructions from /usr/share/doc/udev/README.keymap.txt.gz I was able to create keymap (attached), but I do not know what to write into /lib/udev/rules.d/95-keymap.rules because my system vendor and product descriptions are empty.

As a user I expect to see Chicony KB-0350 among choices in Keyboard Preferences -> Layouts -> Keyboard model. How can I add my model there with a new keymap? Please provide some entrypoints.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: udev 167-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-11.48-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
CheckboxSubmission: b346f016d264f3ef62407d5e29c198a2
CheckboxSystem: daed2f3d6643b4a84b4520a2427f8c2b
CustomUdevRuleFiles: z80_user.rules
Date: Thu Sep 1 14:32:26 2011
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: root=UUID=00b0c28b-3e0b-4bec-96ab-b0ab4604afff ro splash vga=786
SourcePackage: udev
UpgradeStatus: Upgraded to natty on 2011-04-02 (151 days ago)
dmi.bios.date: 04/06/2006
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F6
dmi.board.name: 8I945P-G
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.type: 3
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF6:bd04/06/2006:svn:pn:pvr:rvnGigabyteTechnologyCo.,Ltd.:rn8I945P-G:rvrx.x:cvn:ct3:cvr:

anatoly techtonik (techtonik) wrote :
Martin Pitt (pitti) wrote :

According to your lsusb output this does not seem to be an USB keyboard, but according to http://www.chicony.de/html/0350.html it seems to be an external one. Did you connect it through PS/2? But in the UdevDB attachment I don't even see any input device which could be this keyboard. Did you actually have it connected when you reported this bug?

Changed in udev (Ubuntu):
status: New → Incomplete
anatoly techtonik (techtonik) wrote :

It is PS/2 version. How do you search UdevDB for keyboards?

anatoly techtonik (techtonik) wrote :

Can it be this block from UdevDB.txt?

P: /devices/platform/i8042/serio0/input/input2
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/i8042/serio0/input/input2
E: PRODUCT=11/1/1/ab41
E: NAME="AT Translated Set 2 keyboard"
E: PHYS="isa0060/serio0/input0"
E: PROP=0
E: EV=120013
E: KEY=4 2000000 3803078 f800d001 feffffdf ffefffff ffffffff fffffffe
E: MSC=10
E: LED=7
E: MODALIAS=input:b0011v0001p0001eAB41-e0,1,4,11,14,k71,72,73,74,75,76,77,79,7A,7B,7C,7D,7E,7F,80,8C,8E,8F,9B,9C,9D,9E,9F,A3,A4,A5,A6,AC,AD,B7,B8,B9,D9,E2,ram4,l0,1,2,sfw
E: SUBSYSTEM=input

P: /devices/platform/i8042/serio0/input/input2/event2
N: input/event2
S: input/by-path/platform-i8042-serio-0-event-kbd
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/i8042/serio0/input/input2/event2
E: MAJOR=13
E: MINOR=66
E: DEVNAME=/dev/input/event2
E: SUBSYSTEM=input
E: ID_INPUT=1
E: ID_INPUT_KEY=1
E: ID_INPUT_KEYBOARD=1
E: ID_SERIAL=noserial
E: ID_PATH=platform-i8042-serio-0
E: XKBMODEL=pc105
E: XKBLAYOUT=us,ru
E: XKBVARIANT=,
E: XKBOPTIONS=grp:alt_shift_toggle,grp_led:scroll
E: DEVLINKS=/dev/input/by-path/platform-i8042-serio-0-event-kbd

 status wontfix

anatoly techtonik [2011-10-29 8:52 -0000]:
> It is PS/2 version. How do you search UdevDB for keyboards?

Ah, that explains it.

> Can it be this block from UdevDB.txt?
>
> P: /devices/platform/i8042/serio0/input/input2
> E: UDEV_LOG=3
> E: DEVPATH=/devices/platform/i8042/serio0/input/input2
> E: PRODUCT=11/1/1/ab41
> E: NAME="AT Translated Set 2 keyboard"
> E: PHYS="isa0060/serio0/input0"
> E: PROP=0
> E: EV=120013
> E: KEY=4 2000000 3803078 f800d001 feffffdf ffefffff ffffffff fffffffe
> E: MSC=10
> E: LED=7
> E: MODALIAS=input:b0011v0001p0001eAB41-e0,1,4,11,14,k71,72,73,74,75,76,77,79,7A,7B,7C,7D,7E,7F,80,8C,8E,8F,9B,9C,9D,9E,9F,A3,A4,A5,A6,AC,AD,B7,B8,B9,D9,E2,ram4,l0,1,2,sfw
> E: SUBSYSTEM=input

Yes, that's the only remaining candidate. I suppose it's the only
keyboard on that machine.

Unfortunately there is no way at all to identify a separate PS/2
keyboard. With USB or Bluetooth that's possible because these provide
a vendor and product ID, and for laptop builtin keyboards we can query
the system vendor/product. But neither can apply to a PS/2 keyboard.

So there is no way to fix this for this keyboard type, I'm afraid. If
there is also an USB connector, you can use this, and re-supply the
information with "apport-collect 838760".

Thanks,

Martin

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

Changed in udev (Ubuntu):
status: Incomplete → Won't Fix
anatoly techtonik (techtonik) wrote :

There was a menu "Keyboard Preferences -> Layouts -> Keyboard model" but I can't find it in 11.10
Where did it go?
I want to select my keyboard manually if it can not be autodetected. How can I do this?

BTW, I can't change the status of this report - should I file a new one?

Martin Pitt (pitti) wrote :

anatoly techtonik [2011-10-29 10:22 -0000]:
> I want to select my keyboard manually if it can not be autodetected. How can I do this?

That would be xkeyboard-config, but that wouldn't help -- That needs
correct key codes which the keyboard already does not deliver. I'm
afraid there just is no way to fix this in a generic way in Ubuntu,
you can only install a rules file locally, by creating e. g.
/etc/udev/rules.d/99chicony.rules with

KERNEL=="event*", ENV{ID_INPUT_KEYBOARD}=="1", RUN+="keymap $name 0x93 spreadsheet 0x94 wordprocessor"

Think of it as a device specific driver. :) (That's how Windows gets
along with these quirky devices)

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

anatoly techtonik (techtonik) wrote :

On Sun, Oct 30, 2011 at 1:41 PM, Martin Pitt <email address hidden> wrote:
> anatoly techtonik [2011-10-29 10:22 -0000]:
>> I want to select my keyboard manually if it can not be autodetected. How can I do this?
>
> That would be xkeyboard-config, but that wouldn't help -- That needs
> correct key codes which the keyboard already does not deliver.

What are the codes I've sent earlier then? The ones that are generated
when I press Word/Excel keys?

> I'm
> afraid there just is no way to fix this in a generic way in Ubuntu,
> you can only install a rules file locally, by creating e. g.
> /etc/udev/rules.d/99chicony.rules with
>
> KERNEL=="event*", ENV{ID_INPUT_KEYBOARD}=="1", RUN+="keymap $name 0x93
> spreadsheet 0x94 wordprocessor"

If I have to add this manually then what is the meaning of using
xkeyboard-config?

> Think of it as a device specific driver. :) (That's how Windows gets
> along with these quirky devices)

But how does Windows detect my keyboard and chooses this driver if
PS/2 interface doesn't tell which keyboard is it?
--
anatoly t.

Martin Pitt (pitti) wrote :

Hello,

anatoly techtonik [2011-10-31 10:46 -0000]:
> What are the codes I've sent earlier then? The ones that are generated
> when I press Word/Excel keys?

They are in the udev rule I sent you.

> If I have to add this manually then what is the meaning of using
> xkeyboard-config?

Nothing. I was just pointing out that xkeyboard-config has the layouts
you can set in the control center. But as I said it won't help you.
Please just ignore this part then, if it was confusing.

> > Think of it as a device specific driver. :) (That's how Windows gets
> > along with these quirky devices)
>
> But how does Windows detect my keyboard and chooses this driver if
> PS/2 interface doesn't tell which keyboard is it?

There might be some magic commands you can send to the keyboard to
identify it, but I suppose this keyboard came with a driver CD or so
which you need to install?

Martin

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

anatoly techtonik (techtonik) wrote :

On Mon, Oct 31, 2011 at 4:14 PM, Martin Pitt <email address hidden> wrote:
> Hello,
>
> anatoly techtonik [2011-10-31 10:46 -0000]:
>> What are the codes I've sent earlier then? The ones that are generated
>> when I press Word/Excel keys?
>
> They are in the udev rule I sent you.

I understand that. The question is - why do you think they are not correct?

>> If I have to add this manually then what is the meaning of using
>> xkeyboard-config?
>
> Nothing. I was just pointing out that xkeyboard-config has the layouts
> you can set in the control center. But as I said it won't help you.
> Please just ignore this part then, if it was confusing.

It is not confusing, but incomplete. The app I was speaking about was
able to select keyboard type, not language layout. I can't see this
app in Oneric though.

>> > Think of it as a device specific driver. :) (That's how Windows gets
>> > along with these quirky devices)
>>
>> But how does Windows detect my keyboard and chooses this driver if
>> PS/2 interface doesn't tell which keyboard is it?
>
> There might be some magic commands you can send to the keyboard to
> identify it, but I suppose this keyboard came with a driver CD or so
> which you need to install?

I can't remember installing any drivers for this keyboard on Windows
and yet these keys work.
--
anatoly t.

Martin Pitt (pitti) wrote :

anatoly techtonik [2011-10-31 14:11 -0000]:
> I understand that. The question is - why do you think they are not
> correct?

I never said they weren't correct. The keymap is fine, it's just not
possible to construct an udev rule to apply it, as right now it is not
possible to identify your keyboard. The keymap can certainly not be
applied to _all_ machines/keyboards out there.

> It is not confusing, but incomplete. The app I was speaking about was
> able to select keyboard type, not language layout.

Yes, so was I. That's all in gnome-control-center.

> I can't remember installing any drivers for this keyboard on Windows
> and yet these keys work.

OK, then I don't know how this works.

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

anatoly techtonik (techtonik) wrote :

On Mon, Oct 31, 2011 at 5:48 PM, Martin Pitt <email address hidden> wrote:
> anatoly techtonik [2011-10-31 14:11 -0000]:
>> I understand that. The question is - why do you think they are not
>> correct?
>
> I never said they weren't correct.

---cut---
On Sun, Oct 30, 2011 at 1:41 PM, Martin Pitt <email address hidden> wrote:
> anatoly techtonik [2011-10-29 10:22 -0000]:
>> I want to select my keyboard manually if it can not be autodetected. How can I do this?
>
> That would be xkeyboard-config, but that wouldn't help -- That needs
> correct key codes which the keyboard already does not deliver.
---cut---

According to this text, the codes delivered by keyboard are not
correct. I am not an Englishman, but I think that reads pretty clear.
=)

>The keymap is fine, it's just not
> possible to construct an udev rule to apply it, as right now it is not
> possible to identify your keyboard. The keymap can certainly not be
> applied to _all_ machines/keyboards out there.

I understand that. That's why I asked about the way to manually select
my keyboard.

>> It is not confusing, but incomplete. The app I was speaking about was
>> able to select keyboard type, not language layout.
>
> Yes, so was I. That's all in gnome-control-center.

I can't find the entry in Oneric anymore. =(

>> I can't remember installing any drivers for this keyboard on Windows
>> and yet these keys work.
>
> OK, then I don't know how this works.

I'll try check these two specific buttons once I get to Windows box.
--
anatoly t.

anatoly techtonik (techtonik) wrote :

Ok. It is like 6 years later and 18.04 at the door. I don't use those two keys on Ubuntu, but the scroller wheel works as expected.

The confusing part is that `/etc/default/keyboard` lists my keyboard as `XKBMODEL="pc105"` but I've got (17 keypad + 13 navigation + 13 F/ESC keys) = 43 plus 62 = 105 main keys. And also there are 12 helper keys like refresh, back, etc. + 6 media keys + 2 excel/word leys + scroller, also clickable. So there are 125 keys without scroller and 126 with.

I found that `pc105` string comes from `/usr/share/X11/xkb/rules/xorg.lst` so I want my keyboard to present there too so that I can select it. I also found `/usr/share/X11/xkb/geometry` which describes 86-key keyboard https://www.apt-browse.org/browse/debian/wheezy/main/all/xkb-data/2.5.1-3/file/usr/share/X11/xkb/geometry/chicony and I want to add my keyboard with all my keys there too.

But I first, I need to find some software that allows to check all my key mappings visually.

So far I found this description of PS/2 device discovery, which could be a good starting point:
https://www.mattfischer.com/blog/archives/182

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

Other bug subscribers