Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2005 17:07:11 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        freebsd-current@freebsd.org
Subject:   Re: keyboard mux driver (straw man proposal & code)
Message-ID:  <428E7BAF.200@savvis.net>
In-Reply-To: <428B7B99.7080206@savvis.net>
References:  <4288EBEA.5030701@savvis.net> <428A5A58.6010601@savvis.net> <428B7B99.7080206@savvis.net>

next in thread | previous in thread | raw e-mail | index | archive | help
dear hackers,

next version of experimental keyboard mux can be downloaded from

http://www.geocities.com/m_evmenkin/kbdmux-2.tar.gz (~8K)

also on freefall in my home directory (freefall:~emax/kbdmux-2.tar.gz).

i gave up idea of using slave keyboards in K_XLATE mode. for whatever 
reason i could not get it to work in console (it did work just fine in X).

so, i re-shaped the code and now kbdmux treats slave keyboards just as 
suppliers of raw at scan codes. when keyboard is added to the mux it 
will set be switched into K_RAW mode.

i also decided to not add auxiliary device interface. i think its better 
  to pass keyboard mux ioctl's through /dev/console.

i tried the code with one ps/2 keyboard connected to the mux 
(pass-through) and it worked for me in both X and console.

any feedback is welcome!

thanks,
max

Maksim Yevmenkin wrote:
> and yet another reply to myself :)
> 
> i found few problems with the code and i'm going to fix them.
> 
> max
> 
> Maksim Yevmenkin wrote:
> 
>> replying to myself :)
>>
>> also bcc to folks who might be interested (mostly from vkbd(4) 
>> discussion).
>>
>> i have changed the proposed kbdmux code a bit. basically auxiliary 
>> device interface is gone. there can only be one kbdmux. it is no 
>> longer required to keep kbdmux control device open. so, right now its 
>> pretty much pure keyboard driver. i have also updated test program 
>> (works for me in console mode).
>>
>> http://www.geocities.com/m_evmenkin/kbdmux-1.tar.gz (~6K)
>>
>> the code also on freefall in my home directory 
>> (emax@freefall:kbdmux-1.tar.gz).
>>
>> thanks,
>> max
>>
>> Maksim Yevmenkin wrote:
>>
>>> dear hackers,
>>>
>>> i'd like to follow up on keyboard mux driver discussion with some 
>>> code. please dont start jumping up and down just yet :) this is a 
>>> "straw man" code and everyone is welcome to beat the heck out of it.
>>>
>>> basically the code is based on vkbd(4) and the idea that was 
>>> discussed long time ago - create a "super" keyboard that consumes all 
>>> other keyboards in the system. the code creates a "super" kbdmux 
>>> keyboard. using new special ioctl's one can add multiple keyboards to 
>>> the mux. then one simple switches the current keyboard to the kbdmux 
>>> keyboard.
>>>
>>> as you can see it is not usable from the kernel just yet, but i have 
>>> managed to create a mux with two vkbd's and it worked (please see 
>>> kbdmux_test.c program).
>>>
>>> the questions that i wanted to ask
>>>
>>> 1) is this good enough abstraction for the keyboard mux? can anyone 
>>> think of anything that would not work with this model?
>>>
>>> 2) should we decide to make this usable from the kernel, what is the 
>>> best way to do it?
>>>
>>> 3) did i miss anything? please tell me if i did! :)
>>>
>>> the code can be downloaded from
>>>
>>> http://www.geocities.com/m_evmenkin/kbdmux.tar.gz (~7K)
>>>
>>> i also put it in my home directory on freefall.
>>>
>>> thanks,
>>> max
>>> _______________________________________________
>>> freebsd-current@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>>> To unsubscribe, send any mail to 
>>> "freebsd-current-unsubscribe@freebsd.org"
>>
>>
>>
>>
> 
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"



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