using vkbd device

Maksim Yevmenkin maksim.yevmenkin at savvis.net
Fri Jun 3 16:46:09 GMT 2005


Norbert,

> I am trying to use vkbd to multiplex
> an at keyboard and an usb keyboard
> into syscons.

ok

> Vkbd's control device's write routine
> expects ints to queue to the slave device.

correct

> As I understand, those ints map 1:1
> to the chars I read from a keyboard device, right?

yes, the ints should represent AT keyboard scancodes.

> So I open, for example, /dev/kbd0, set it to K_RAW,
> read chars from it and write them as ints to
> vkbd's control device, right?

yes, it should work. keep in mind that vkbd(4) emulates only one 
keyboard and keeps only one state. that is if you feed scancodes from 
multiple sources into the same vkbd(4) then it will look like one huge 
keyboard with lots of duplicated keys. so you can press shift/ctrl/alt 
on one keyboard and actual key on another, but it still will look like 
you have presses the keys on the same keyboard.

you also might want to look at experimental keyboard mux drivers. it is 
based on vkbd(4) and uses the idea of one super-keyboard that consumes 
scancodes from other keyboards. there are still a few issues i need to 
fix, but, in general, it works.

http://www.geocities.com/m_evmenkin/kbdmux-2.tar.gz

thanks,
max


More information about the freebsd-hackers mailing list