Re: [PATCH 0/5] Sonypi driver model & PM changes

From: Vojtech Pavlik
Date: Mon Oct 25 2004 - 09:02:08 EST


On Mon, Oct 25, 2004 at 03:50:36PM +0200, Stelian Pop wrote:

> The special keys are like KEY_BACK, KEY_HELP, KEY_ZOOM, KEY_CAMERA,
> and a dozen FN + some key combinations.
>
> I can integrate those events into the input layer in 2 different ways:
>
> * allocate a new key event (in include/linux/input.h) for each
> key *and* combination. This will make the keys and the combinations
> work both on the console and in X.
>
> Unfortunately only events under the 0xff limit seem to be
> propagated to X, the other ones don't generate any X event (I haven't
> looked at the problem but I suppose it somewhere into the X code).

The number is 240 and it's the number of possible PS/2 scancode
combinations, and since at this time X can only understand the PS/2
protocol (and not native Linux events), this is the only way how to pass
keypresses to X.

I believe that although this way may be easier, it leads to madness.

> showkey does corectly see the keys in raw mode.
>
> * allocate a FN key event and let FN be a modifier.
>
> This is much nicer (less events allocated in input.h), but I haven't
> found a way (and I'm not sure there is one) to say to X that Fn is a
> *new* modifier. Yes, I can say FN act like a Control, Meta or whatever
> existing modifier, but this is useless since I already have a Control,
> Alt, etc. key on my keyboard. The whole point is to add support for
> a new key !
>
> I also haven't looked yet at adding a new modifier in the console
> mode...

IIRC X has only 8 modifier keys and all are already defined and you
can't define any more. But I doubt you're using all of them on your
keyboard. It should be possible to assign Fn to one of them.

--
Vojtech Pavlik
SuSE Labs, SuSE CR
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/