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

From: Stelian Pop
Date: Mon Oct 25 2004 - 08:57:34 EST


On Mon, Oct 25, 2004 at 02:56:29PM +0200, Stelian Pop wrote:

> I have quite a few changes in my tree already for the sonypi driver,
> and I was delaying the submission because I need to solve a problem
> with the integration with the input subsystem...

Speaking of this, Vojtech, how should I proceed ?

Let me remind you the problem: I am in the process of converting
the sonypi driver to (fully) use the input subsystem to forward
special key presses to X and the console instead of using a userspace
daemon which pushes the KeyPress events into the X queue.

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).

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...

Please advice on the recommended way to do this properly.

Stelian.
--
Stelian Pop <stelian@xxxxxxxxxx>
-
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/