lkml.org 
[lkml]   [1998]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: uniform input device packets?
On Thu, Jun 25, 1998 at 02:42:19AM -0400, James Michael Mastros wrote:

> > > I think your both forgetting that we need to give the axis number and the
> > > position.
> > * for axis events everything will stay as is
> > * for buttons we define three new event types press, release, and repeat
> > * for buttons we put the number into new_state field instead of number field
> Ahh... Now I see. However, I'd add a button type "toggle" -- for hardware
> that dosn't tell us the previous state (broken, IMHO), and for telling us to
> toggle the blinkinlights on our keyboards <G>.

Do you know of such hardware? (That would send the same data when a key is
pressed and when it is released? That's very broken. IMNSHO) For this
hardware it'd be best to assume that at powerup no keys were pressed and keep
track on what is pressed and what not in the driver. No need for a 'toggle'
event.

> > With this we limit number of axes to 52 in total, however get 65536 buttons.
> > Whether we need this is a question, of course. Should we use some
> > standardized codes for keys; then yes.

> I think that that's overencoding just a bit -- we don't have to be that
> space-concious. (And I don't know what that has to do with standard keycodes.)

If you use 8 bits per button number you can't easily predefine all standard
keycodes, since there is definitely more than 256 different keys in the world
(though not on the same keyboard).

Myself I would stick with the simplest protocol (8 bits event type, 8 bits
axis/button number, 16 bits data), because it's 32 bits in total, which makes
things nicely aligned, easy to decode, and stuff. On the other hand we have
to number the keys from 0 sequentially if we want anything reasonable, and
provide an out of band way how to identify that key number 72 is labeled 'G'.

Vojtech

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.102 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site