Subject: Re: wsmux inject
To: None <tech-kern@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: tech-kern
Date: 03/15/2006 02:28:58
On Tue, Mar 14, 2006 at 23:17:12 +0000, Iain Hibbert wrote:

> > To feed terminal input from user space, you need a way to inject raw
> > scancodes that need to end up being passed to wskbd_input.
> 
> Well, it seems that I could do that quite simply by creating a
> WSKBDIO_INJECT ioctl in wskbd_displayioctl() though thats a bit of a
> bodge..

Yeah, it doesn't feel clean.


> I'm thinking it would likely be better to make a pseudo-device that
> would attach as a wsbkdN when necessary, not sure if that will work
> as planned.

It will.  See e.g. sys/dev/hpc/hpf1275a_tty.c (HP F1275A external
(serial) keyboard for Jornada series).  Config glue is:

pseudo-device   hpf1275a                # HP F1275A external keyboard
wskbd* at hpf1275a? mux 1


SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen