Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2004 01:22:41 +0100
From:      Philip Paeps <philip@freebsd.org>
To:        Scott Long <scottl@freebsd.org>
Cc:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Subject:   Re: cvs commit: src/sys/dev/vkbd vkbd.c vkbd_var.h src/sys/modules/vkbd Makefile
Message-ID:  <20041117002241.GG24418@fasolt.home.paeps.cx>
In-Reply-To: <419A492A.7020602@freebsd.org>
References:  <bb4a86c7041116093262758595@mail.gmail.com> <7302.1100627038@critter.freebsd.dk> <bb4a86c704111610006d8283ed@mail.gmail.com> <20041116180905.GA11906@odin.ac.hmc.edu> <bb4a86c70411161028698cbae2@mail.gmail.com> <419A492A.7020602@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2004-11-16 11:38:34 (-0700), Scott Long <scottl@freebsd.org> wrote:
> What we really need is a single unified keyboard and mouse virtualization
> layer that allows bluetooth, usb, and at/ps2 devices to plug in at the
> bottom and talk to the one or more console interfaces at the top.

I sollicited ideas for a 'generic input core' layer on -arch not long ago :-)

My idea/dream/goal/foo is to have a little driver provide an interface to sit
between what we now know as kbd and all its children, psm, ums, and the three
usb-but-not-hid touchscreen drivers I've been procrastinating on porting, and
feed events back to syscons in a consistent sort of way.

Something like input-core in the Linux kernel, but prettier *grin*

I envision an API where we can do an input_register_mouse() or _kbd() during
attachment of a hardware driver (or indeed a virtual driver like vkbd(4)),
followed by input_feed_event() in the interrupt handler to send the events
over to syscons.

Hardware drivers would only need to do a minimum of processing before feeding
to syscons (have the Magic Input Core deal with scaling and translating from
absolute coordinates to motions and whatnot).

The 'on top of the hardware drivers' bit should be fairly simple to do, I
think.  I've been hacking at it on the bus in the last week or so, getting
strange looks from people because apparantly I've been talking to myself.
Getting syscons to like input might be a bit trickier, mainly because
everytime I try to grasp how syscons works, it becomes even less clear :-o

One of the things I'd like to achieve as a nice bonus is to be able to get rid
of moused and the duplication it causes, and to allow X11 to get to the mice
directly without stealing them from syscons.

> It should allow devices to be plugged in at runtime and should insulate the
> real console interface from caring which keyboard is plugged in at boot, if
> any are at all.  And yt _does_ need to work in single user mode and in DDB.

That'll be another challenge :-)  The problem with ddb will be getting the
input to the debugger through the different bits of kernel without losing
anything along the way.

> I know I'm saying a lot of 'shoulds' right now, but the rise of these
> non-at/ps2 keyboards is causing us lots of problems and we need to fix it.
> Brooks had talked about working on something similar to what I've described
> above, so please work with him to mold your vkbd work into that model.

Keyboards, mice, joysticks, voodoo dolls, anything that produces input, I'd
like to see under one happy little interface...  I hope to have some useful
code to post on -hackers or -arch in a couple of busrides.  Ideas most
welcome.

 - Philip

-- 
Philip Paeps                                    Please don't Cc me, I am
philip@freebsd.org                               subscribed to the list.

  The organisation of any program reflects the organisation
  of the people who developed it.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041117002241.GG24418>