2004-01-10 21:28:07

by sven kissner

[permalink] [raw]
Subject: logitech cordless desktop deluxe optical keyboard issues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hello,

i use the keyboard mentioned in the topic attached to the ps/2 keyboard port.
most keys can be mapped using lineak or appropriate applications but i have
problems getting some keys to work. i tested this with 2.6.0 and 2.6.1 as
well as with some of the 2.4 series. with wintendo xp, all keys are working
fine using logitech's itouch software.

xev is not displaying keycodes for the special keys not working but i get
various messages by dmesg when pressing them:

<-- snip -->
atkbd.c: Unknown key pressed (translated set 2, code 0x91 on isa0060/serio0).
atkbd.c: Unknown key released (translated set 2, code 0x91 on isa0060/serio0).
atkbd.c: Unknown key pressed (translated set 2, code 0x92 on isa0060/serio0).
atkbd.c: Unknown key released (translated set 2, code 0x92 on isa0060/serio0).
<-- snap -->

on startup, i get the following:
with 2.6.x:
<-- snip -->
serio: i8042 KBD port at 0x60,0x64 irq 1
input: AT Translated Set 2 keyboard on isa0060/serio0
[..]
INIT: version 2.85
Loading /etc/console/boottime.kmap.gz
KDSKBENT: Invalid argument
failed to bind key 265 to value 638
KDSKBENT: Invalid argument
failed to bind key 265 to value 638
<-- snap -->

with 2.4.20 & 2.4.22-ck2 the value is increasing from 128 to 511, restarting
~10 times(!):
<-- snip -->
INIT: version 2.85
Loading /etc/console/boottime.kmap.gz
KDSKBENT: Invalid argument
failed to bind key 128 to value 512
[..]
failed to bind key 511 to value 512
<-- snap -->

if i connect the kb to usb, there are slightly different issues, but let's do
it step-by-step ;). any ideas how to get this working? if you require
additional information, just let me know.

if answering, please put me on cc for i'm not subscribed to the list.

keep on rockin,
sven
- --
..never argue with idiots. they drag you down to their level and beat you with
experience..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAAG8MPV/e7f4i4AERAm2aAKCXkcngzoaoVI0caZ9qCnzIx8qSxACdEJtx
VmFnQRAFUhCckPWPbf0PKD8=
=AaJH
-----END PGP SIGNATURE-----


2004-01-11 04:05:59

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

> Anyway, I released kbd-1.10 last week or so, and it ignores the
> kernel NR_KEYS but tries to adapt dynamically to the kernel.
> It would not come with this error message, I suppose.

the message doesn't appear anymore, but installing is giving me
the following:

<-- snip -->
Setting up kbd (1.10-1) ...
Looking for keymap to install:
de-latin1-nodeadkeys
cannot open file de-latin1-nodeadkeys
Loading /etc/console/boottime.kmap.gz
<-- snap -->

I suppose by default you would find these under

/usr/share/kbd/keymaps/i386/qwertz/de-latin1-nodeadkeys.map.gz
/usr/share/kbd/keymaps/mac/all/mac-de-latin1-nodeadkeys.map.gz

> : atkbd.c: Unknown key pressed (translated set 2, code 0x91 on
>
> This is something different, a key without associated keycode.
> That is normal. If it really has high bit set it is a bit unusual.
> (What does showkey -s show?)

showkey -s is giving me exactly the same:
<-- snip -->
atkbd.c: Unknown key pressed
<-- snap -->

That is a kernel message, not showkey output.
(BTW - which kernel precisely? The message is not the 2.6.0 one.)
Maybe showkey -s never sees them?

Andries

2004-01-11 08:25:21

by sven kissner

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 11 January 2004 05:05, [email protected] wrote:
>
> > : atkbd.c: Unknown key pressed (translated set 2, code 0x91 on
> >
> > This is something different, a key without associated keycode.
> > That is normal. If it really has high bit set it is a bit unusual.
> > (What does showkey -s show?)
>
> showkey -s is giving me exactly the same:
> <-- snip -->
> atkbd.c: Unknown key pressed
> <-- snap -->
>
> That is a kernel message, not showkey output.
> (BTW - which kernel precisely? The message is not the 2.6.0 one.)
> Maybe showkey -s never sees them?

i'm running a vanilla 2.6.1-kernel, without any additional patches. you're
right about the message, showkey is exiting after 10s, even if i keep one of
the 'problematic' keys pressed..

sven
- --
..never argue with idiots. they drag you down to their level and beat you with
experience..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAAQkbPV/e7f4i4AERAtvlAJ9ZuzhypFDzcIz5aUsxgqmPXWuhXACdFTyd
KDY8eZYaEZ44u0se4/nWmcQ=
=Qryn
-----END PGP SIGNATURE-----

2004-01-11 14:03:10

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

> That is a kernel message, not showkey output.
> (BTW - which kernel precisely? The message is not the 2.6.0 one.)
> Maybe showkey -s never sees them?

i'm running a vanilla 2.6.1-kernel, without any additional patches.
you're right about the message, showkey is exiting after 10s, even
if i keep one of the 'problematic' keys pressed..

Yes, I see. Looking at 2.6.1 things are a bit different again,
but raw mode is very broken. Instead of reporting what the
keyboard sends, as raw mode is supposed to do, the scancode
is first converted to a keycode, and in the case of an unknown
scancode it is then just thrown away. In raw mode the keycode
is later translated back to a scancode (using a correspondence
that is not 1-1), but in your case we never get that far.

Did you try using setkeycodes? Say

# setkeycodes 91 120 92 121

to map scancode 0x91 to keycode 120 and 0x92 to 121.

Andries

2004-01-11 16:02:34

by sven kissner

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 11 January 2004 14:58, [email protected] wrote:
>
> Did you try using setkeycodes? Say
>
> # setkeycodes 91 120 92 121
>
> to map scancode 0x91 to keycode 120 and 0x92 to 121.

sure but it's not working:
<-- snip -->
# setkeycodes 91 120
setkeycode: code outside bounds
usage: setkeycode scancode keycode ...
(where scancode is either xx or e0xx, given in hexadecimal,
and keycode is given in decimal)
<-- snap -->

sven
- --
..never argue with idiots. they drag you down to their level and beat you with
experience..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAAXRGPV/e7f4i4AERAiTgAJ9cyUsE8C77ZYkW2w6OAeQH6qyaogCfSLJ1
qt8jQWWse/p6Ya32pQImpwE=
=nK3F
-----END PGP SIGNATURE-----

2004-01-11 16:32:45

by Andries Brouwer

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

On Sun, Jan 11, 2004 at 05:05:06PM +0100, sven kissner wrote:

> sure but it's not working:

> # setkeycodes 91 120
> setkeycode: code outside bounds

Hm, yes. What about this version?

-------- sk.c -------
/*
* call: sk scancode keycode
* (where scancode is given in hexadecimal, and keycode in decimal)
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <linux/kd.h>

int
main(int argc, char **argv) {
struct kbkeycode a;
char *ep;

if (argc != 3) {
fprintf(stderr, "Call: sk scancode keycode\n");
exit(1);
}

a.scancode = strtol(argv[1], &ep, 16);
a.keycode = atoi(argv[2]);

if (ioctl(0, KDSETKEYCODE, &a)) {
perror("KDSETKEYCODE");
fprintf(stderr, "failed to set scancode 0x%x to keycode %d\n",
a.scancode, a.keycode);
exit(1);
}

return 0;
}

2004-01-11 18:34:40

by sven kissner

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 11 January 2004 17:32, Andries Brouwer wrote:
> Hm, yes. What about this version?

i'm not a programmer and not quite sure what to do with it.. ;)

sven
- --
..never argue with idiots. they drag you down to their level and beat you with
experience..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAAZfxPV/e7f4i4AERAicGAJ44YxnCdKw0wrruiFYzD/mFnN3/QACfc+PR
vXg64Mze6oF3PgAtTFvt2UU=
=8bAR
-----END PGP SIGNATURE-----

2004-01-11 19:03:54

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

> i'm not a programmer and not quite sure what to do with it.. ;)

Ah, sorry. Put the text (starting with the /* line) in a file
called sk.c. Compile it using the command "cc -Wall sk.c -o sk".
Then invoke it using ./sk, for example "./sk 92 120".

Andries

2004-01-11 19:32:38

by sven kissner

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 11 January 2004 20:03, [email protected] wrote:
> Ah, sorry. Put the text (starting with the /* line) in a file
> called sk.c. Compile it using the command "cc -Wall sk.c -o sk".
> Then invoke it using ./sk, for example "./sk 92 120".

nice! i can assign the keys. thanks andries. is there a (kbd-)configuration
file where this mapping should be done (or a recommendation)?

sven
- --
..never argue with idiots. they drag you down to their level and beat you with
experience..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAAaWGPV/e7f4i4AERArH7AJ92l8Dc6WQP+6kihdGAH1cgmr3MYQCcDn1S
2Rbjk9sRXRL+sRAYaxFuHVo=
=yO85
-----END PGP SIGNATURE-----

2004-01-11 19:47:06

by Andries Brouwer

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

On Sun, Jan 11, 2004 at 08:35:34PM +0100, sven kissner wrote:

> nice! i can assign the keys. thanks andries. is there a (kbd-)configuration
> file where this mapping should be done (or a recommendation)?

There are many distributions, and all arrange such things
a bit different again. If you want to assign to these keys,
probably using loadkeys, then the ./sk command must precede
the loadkeys command. Maybe such stuff lives in /etc/rc.d/kbd
or maybe in /etc/rc.d/rc.sysinit, or some such place.
There will be a default keymap somewhere that you will want to adapt.

Andries

2004-01-22 22:45:21

by sven kissner

[permalink] [raw]
Subject: Re: logitech cordless desktop deluxe optical keyboard issues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 11 January 2004 20:46, Andries Brouwer wrote:
> On Sun, Jan 11, 2004 at 08:35:34PM +0100, sven kissner wrote:
> > nice! i can assign the keys.

there are still 4 keys (f-keys with f-lock active) which i can't map to 'free'
keycodes: no matter which value i assign with sk, they always get mapped to
already mapped keys which causes them to collide (e.g. f-lock+f3 always gets
mapped to keycode 108 which is already assigned to 'enter' on the numpad)

note that those collisions happen inside x (4.3). writing this, i recognize
that this is probably more of a x-problem. anyhow, maybe someone with the
same problems or even solutions is followig this thread ;)

keep on rockin'
sven
- --
..never argue with idiots. they drag you down to their level and beat you with
experience..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAEFOCPV/e7f4i4AERAqIOAKCXjtguVq/sIYpRQ2lzW8slHcCiLwCeIZg6
RxlmStFfzZuWLvQJ8Kmc3j0=
=FI3y
-----END PGP SIGNATURE-----