lkml.org 
[lkml]   [2006]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Expose input device usages to userspace
Date
On Monday 13 March 2006 16:02, Arjan van de Ven wrote:
> On Mon, 2006-03-13 at 21:54 +0100, Elias Naur wrote:
> > Hi,
> >
> > I believe that the current event input interface is missing some kind of
> > information about the general kind of input device (Mouse, Keyboard, Joystick
> > etc.) so I added a simple ioctl to do just that. The relevant line in
> > include/linux/input.h is:
> >
> > #define EVIOCGUSAGE(len) _IOC(_IOC_READ, 'E', 0x1c, len) /* get all
> > usages */
> >
> > It returns a bit set with the device usages. Current usages are:
> >
> > #define USAGE_MOUSE 0x00
> > #define USAGE_JOYSTICK 0x01
> > #define USAGE_GAMEPAD 0x02
> > #define USAGE_KEYBOARD 0x03
>
>
> I'm not sure that this is a good idea in general.
> However when you do it, at least make it a bitmap; things can be both a
> mouse and a keyboard for example.
>

No, I don't think this is needed at all - users should be interested in
what capabilities a particular device has, not what type it was assigned
by soneone.

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

\
 
 \ /
  Last update: 2006-03-14 06:29    [W:3.385 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site