Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN (v2)

2007-06-30 Thread Henrique de Moraes Holschuh
On Fri, 29 Jun 2007, Dmitry Torokhov wrote: > Finally gottent to the patch. It seems a little long-winded, how about > the patch below instead? Well, your version of the patch: 1. does not make it clear to *userland* that using EV_SCAN instead of EV_KEY is something that is not to be done. If us

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN (v2)

2007-06-28 Thread Dmitry Torokhov
Hi Henrique, On Wednesday 06 June 2007 12:55, Henrique de Moraes Holschuh wrote: > We have most of the pieces needed to have sane, generic userland keyboard > handling in place for a while now, but it is not sufficiently documented. > > This patch documents the requirements and best practices for

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-20 Thread Helge Hafting
Henrique de Moraes Holschuh wrote: On Fri, 01 Jun 2007, Matthew Garrett wrote: On Thu, May 31, 2007 at 11:33:10PM -0400, Dmitry Torokhov wrote: On Thursday 31 May 2007 21:44, Matthew Garrett wrote: It's not trivial at all. You need to introduce a mechanism for noting a KEY_UNKNO

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-01 Thread Dmitry Torokhov
On 6/1/07, Henrique de Moraes Holschuh <[EMAIL PROTECTED]> wrote: On Fri, 01 Jun 2007, Dmitry Torokhov wrote: > On 6/1/07, Matthew Garrett <[EMAIL PROTECTED]> wrote: > What I am trying to say - there already EVIOCSKEYCODE ioctl in the > kernel. And for force feedback devices to work you need to n

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-01 Thread Henrique de Moraes Holschuh
On Fri, 01 Jun 2007, Dmitry Torokhov wrote: > On 6/1/07, Matthew Garrett <[EMAIL PROTECTED]> wrote: > What I am trying to say - there already EVIOCSKEYCODE ioctl in the > kernel. And for force feedback devices to work you need to nable > writing to corresponding /dev/input/eventX thus opening possi

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-01 Thread Henrique de Moraes Holschuh
On Fri, 01 Jun 2007, Matthew Garrett wrote: > Or we could just leave the mapping up to individual users, which avoids > the problem. Other than the fact that it is not a piece of candy to implement correctly. > > Again, it is not only about X. What if X is not running (or running but > > nobody

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-01 Thread Henrique de Moraes Holschuh
On Fri, 01 Jun 2007, Matthew Garrett wrote: > On Thu, May 31, 2007 at 11:33:10PM -0400, Dmitry Torokhov wrote: > > On Thursday 31 May 2007 21:44, Matthew Garrett wrote: > > > It's not trivial at all. You need to introduce a mechanism for noting a > > > KEY_UNKNOWN keypress. It then needs to signal

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-01 Thread Matthew Garrett
On Fri, Jun 01, 2007 at 10:04:56AM -0400, Dmitry Torokhov wrote: > Anyway, I think that we don't want ordinary users to alter hardware > keymapping, it should indeed be priveleged operation done by box's > administrator. Hopefully the infrastructure (hal/udev/whatever) will > be able to load prope

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-01 Thread Dmitry Torokhov
On 6/1/07, Matthew Garrett <[EMAIL PROTECTED]> wrote: On Fri, Jun 01, 2007 at 12:37:58AM -0400, Dmitry Torokhov wrote: > On Friday 01 June 2007 00:08, Matthew Garrett wrote: > > If you let users alter the kernel keymap, then you need to implement > > support for resetting the kernel keymap on exi

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-06-01 Thread Matthew Garrett
On Fri, Jun 01, 2007 at 12:37:58AM -0400, Dmitry Torokhov wrote: > On Friday 01 June 2007 00:08, Matthew Garrett wrote: > > If you let users alter the kernel keymap, then you need to implement > > support for resetting the kernel keymap on exit. Otherwise it's a > > trivial DoS. > > > > You alr

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Dmitry Torokhov
On Friday 01 June 2007 00:08, Matthew Garrett wrote: > On Thu, May 31, 2007 at 11:33:10PM -0400, Dmitry Torokhov wrote: > > On Thursday 31 May 2007 21:44, Matthew Garrett wrote: > > > It's not trivial at all. You need to introduce a mechanism for noting a > > > KEY_UNKNOWN keypress. It then needs

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Matthew Garrett
On Thu, May 31, 2007 at 11:33:10PM -0400, Dmitry Torokhov wrote: > On Thursday 31 May 2007 21:44, Matthew Garrett wrote: > > It's not trivial at all. You need to introduce a mechanism for noting a > > KEY_UNKNOWN keypress. It then needs to signal the user (dbus is probably > > the best layer for

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Dmitry Torokhov
On Thursday 31 May 2007 21:44, Matthew Garrett wrote: > On Thu, May 31, 2007 at 10:29:28PM -0300, Henrique de Moraes Holschuh wrote: > > On Fri, 01 Jun 2007, Matthew Garrett wrote: > > > Given existing userspace, it's never useful to generate KEY_UNKNOWN. > > > Adding extra information to the even

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Henrique de Moraes Holschuh
On Fri, 01 Jun 2007, Matthew Garrett wrote: > On Thu, May 31, 2007 at 10:29:28PM -0300, Henrique de Moraes Holschuh wrote: > > On Fri, 01 Jun 2007, Matthew Garrett wrote: > > > Given existing userspace, it's never useful to generate KEY_UNKNOWN. > > > Adding extra information to the event doesn't

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Matthew Garrett
On Thu, May 31, 2007 at 10:29:28PM -0300, Henrique de Moraes Holschuh wrote: > On Fri, 01 Jun 2007, Matthew Garrett wrote: > > Given existing userspace, it's never useful to generate KEY_UNKNOWN. > > Adding extra information to the event doesn't alter that. > > It will not break anything, and it

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Henrique de Moraes Holschuh
On Fri, 01 Jun 2007, Matthew Garrett wrote: > On Thu, May 31, 2007 at 09:13:04PM -0300, Henrique de Moraes Holschuh wrote: > > Well, we already produce KEY_UNKNOWN anyway, and the stuff you quoted above > > just makes KEY_UNKNOWN useful for something instead of keeping it as an > > useless notice t

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Matthew Garrett
On Thu, May 31, 2007 at 09:13:04PM -0300, Henrique de Moraes Holschuh wrote: > Well, we already produce KEY_UNKNOWN anyway, and the stuff you quoted above > just makes KEY_UNKNOWN useful for something instead of keeping it as an > useless notice to the user that some key (which one? who knows!) wa

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Henrique de Moraes Holschuh
On Fri, 01 Jun 2007, Matthew Garrett wrote: > On Thu, May 31, 2007 at 07:28:14PM -0300, Henrique de Moraes Holschuh wrote: > > We have all the pieces needed to have sane, generic userland keyboard > > handling > > in place for a while now, but it was not sufficiently documented (or used!). > > >

Re: [PATCH] Input: document the proper usage of EV_KEY and KEY_UNKNOWN

2007-05-31 Thread Matthew Garrett
On Thu, May 31, 2007 at 07:28:14PM -0300, Henrique de Moraes Holschuh wrote: > We have all the pieces needed to have sane, generic userland keyboard handling > in place for a while now, but it was not sufficiently documented (or used!). > > If EV_KEY input drivers always generate scan codes that c