Linux tty keyboard driver...

Feb 23, 2006 3 Replies

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.

formatting link

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? (_)\(_)

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required