Linux tty keyboard driver...

I have written a driver to read an external switch array. I need to insert these key presses as standard key codes into the tty keyboard buffer. Can someone explain how to do this?

Reply to
twgray
Loading thread data ...

twgray ha scritto:

Hi Terry, how are you ?

You can take a look at this keyboard driver.

formatting link

HTH

--
Marco Cavallini
Koan s.a.s. - Bergamo - ITALIA
Embedded and Real-Time Software Engineering
www.koansoftware.com    |    www.klinux.org
Reply to
Marco Cavallini

You could translate the key presses into corresponding PS/2 (scan code set 1) bytes and pass them to handle_scancode() which is part of your normal keyboard handler.

--
Wil
Reply to
Wil Taphoorn

google for kbde and kbdd

kbde uses a kernel module to inject keypresses into handle_scancode as someone suggested; kbdd uses /dev/uinput so no kernel module is needed.

--Yan

--
  o__
  ,>/'_          o__
  (_)\(_)        ,>/'_        o__
Yan Seiner, PE  (_)\(_)       ,>/'_     o__
Certified Personal Trainer   (_)\(_)    ,>/'_        o__
Licensed Professional Engineer         (_)\(_)       ,>/'_
Who says engineers have to be pencil necked geeks?  (_)\(_)
Reply to
Captain Dondo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.