Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Dmitry Torokhov
On 5/29/07, Henrique de Moraes Holschuh <[EMAIL PROTECTED]> wrote: > On Mon, 28 May 2007, Dmitry Torokhov wrote: > > On Sunday 27 May 2007 08:15, Henrique de Moraes Holschuh wrote: > > > On Sat, 26 May 2007, Dmitry Torokhov wrote: > > > > I am unconvinced that we need new keycodes. Isn't there a be

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Matthew Garrett
On Wed, May 30, 2007 at 09:57:11AM -0400, Dmitry Torokhov wrote: > I really don't like KEY_FN_F1..KEY_FN_BACKSPACE either. What are they > supposed to do? Just being an unique value to be mapped onto something > useful? But why not use that useful keycode to begin with? We've already got KEY_PROG

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Dmitry Torokhov
Hi Matthew, On 5/30/07, Matthew Garrett <[EMAIL PROTECTED]> wrote: > On Wed, May 30, 2007 at 09:57:11AM -0400, Dmitry Torokhov wrote: > > > I really don't like KEY_FN_F1..KEY_FN_BACKSPACE either. What are they > > supposed to do? Just being an unique value to be mapped onto something > > useful? B

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Matthew Garrett
On Wed, May 30, 2007 at 10:18:17AM -0400, Dmitry Torokhov wrote: > Hi Matthew, > >We've already got KEY_PROG* - is this not the sort of situation they're > >for? (ie, keys that aren't mapped to a specific purpose but would be > >potentially useful to userspace at the per-user level) > > > > Right.

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Dmitry Torokhov
On 5/30/07, Matthew Garrett <[EMAIL PROTECTED]> wrote: > On Wed, May 30, 2007 at 10:18:17AM -0400, Dmitry Torokhov wrote: > > Hi Matthew, > > >We've already got KEY_PROG* - is this not the sort of situation they're > > >for? (ie, keys that aren't mapped to a specific purpose but would be > > >poten

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Matthew Garrett
On Wed, May 30, 2007 at 10:31:35AM -0400, Dmitry Torokhov wrote: > Not all world is X :) Actually few of "FN" keys, like KEY_WLAN, > KEY_SLEEP, etc should be handled not [only] by X but by other layers. I agree - the ones that have a defined function should certainly be set to sensible defaults

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Henrique de Moraes Holschuh
On Wed, 30 May 2007, Dmitry Torokhov wrote: > On 5/30/07, Matthew Garrett <[EMAIL PROTECTED]> wrote: > >We've already got KEY_PROG* - is this not the sort of situation they're > >for? (ie, keys that aren't mapped to a specific purpose but would be > >potentially useful to userspace at the per-user

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Henrique de Moraes Holschuh
On Wed, 30 May 2007, Dmitry Torokhov wrote: > On 5/29/07, Henrique de Moraes Holschuh <[EMAIL PROTECTED]> wrote: > >But I will still need to add keys, and I still think that a bunch of 32 or > >so HOSTSPECIFIC keys is a very very good idea to have, *even* if I add some > >model specific knowledge a

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Dmitry Torokhov
On 5/30/07, Henrique de Moraes Holschuh <[EMAIL PROTECTED]> wrote: > On Wed, 30 May 2007, Dmitry Torokhov wrote: > > On 5/29/07, Henrique de Moraes Holschuh <[EMAIL PROTECTED]> wrote: > > >But I will still need to add keys, and I still think that a bunch of 32 or > > >so HOSTSPECIFIC keys is a very

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Henrique de Moraes Holschuh
On Wed, 30 May 2007, Dmitry Torokhov wrote: > >1. Generate SOMETHING that has an undefined meaning or function, but which > >is unique for that keyboard (KEY_PROG/KEY_HOSTSPECIFIC) > > How do you guarantee that KEY_PROG* is unique for the keyboard? What > do you do if you have 2 devices generating

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Dmitry Torokhov
On 5/30/07, Henrique de Moraes Holschuh <[EMAIL PROTECTED]> wrote: > On Wed, 30 May 2007, Dmitry Torokhov wrote: > > >1. Generate SOMETHING that has an undefined meaning or function, but which > > >is unique for that keyboard (KEY_PROG/KEY_HOSTSPECIFIC) > > > > How do you guarantee that KEY_PROG* i

Re: [ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: add thinkpad keys to input.h

2007-05-30 Thread Matthew Garrett
On Wed, May 30, 2007 at 04:25:03PM -0400, Dmitry Torokhov wrote: > Consider ejecting a CD tray. You have a laptop with a key that maked > eject CD. Because it is a new laptop there are no proper mapping yet > so some adjustments are needed. With your scenario the kernel emits > KEY_PROG26. User ha

[ibm-acpi-devel] [PATCH] ACPI: thinkpad-acpi: do not use named sysfs groups

2007-05-30 Thread Henrique de Moraes Holschuh
The initial version of the thinkpad-acpi sysfs interface (not yet released in any stable mainline kernel) made liberal use of named sysfs groups, in order to get the attributes more organized. This proved to be a really bad design decision. Maybe if attribute groups were as flexible as a real dir

[ibm-acpi-devel] Making KEY_UNKNOWN really useful to userland

2007-05-30 Thread Henrique de Moraes Holschuh
On Wed, 30 May 2007, Dmitry Torokhov wrote: > On 5/30/07, Henrique de Moraes Holschuh <[EMAIL PROTECTED]> wrote: > >It is trivial to guarantee that KEY_PROG is unique for a single input > >device (keyboard), but it certainly won't work across multiple devices. > >Userspace has to know what kind of