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?
- posted
18 years ago
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?
twgray ha scritto:
Hi Terry, how are you ?
You can take a look at this keyboard driver.
HTH
-- Marco Cavallini Koan s.a.s. - Bergamo - ITALIA Embedded and Real-Time Software Engineering www.koansoftware.com | www.klinux.org
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
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? (_)\(_)
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.