2009-04-18 20:26:51     How to assign an arbitrary keyboard driver as console input

Document created by Aaronwu Employee on Aug 15, 2013
Version 1Show Document
  • View in full screen mode

2009-04-18 20:26:51     How to assign an arbitrary keyboard driver as console input

Rob Maris (GERMANY)

Message: 72820   

 

I have set up gpio-keys for my purposes. event_test runs properly. I have assiged some normal keysyms to some input pins. Despite quering a couple of documents, I don't find a way to let button hits appear as console input characters.

 

A test with cat /dev/event0 or cat /dev/input/event both do correcly (there exists no device under /dev/input/event0).

 

I'd prefer to have input character events from the serial line be processed in the same event queue as the gpio-keys.

QuoteReplyEditDelete

 

 

2009-04-20 09:21:04     Re: How to assign an arbitrary keyboard driver as console input

Rob Maris (GERMANY)

Message: 72874   

 

Follow-up:

 

This is an excerpt of cat/dev/event0:

 

root: /> cat /dev/event0

�U�E`��U�E`��U�E`��U�E`��U�E�?�U�E�?�U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E@��U�E}�U�E}�U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`��U�E`�^

 

 

(after hitting some keys - note that event_test supplies information as expected)

 

Of course, this event output contains more than the keystroke for each keystroke element. So, a tty device should be used.

 

When I execute cat /dev/tty, nothing happens. And tty0 is not defined.

 

On another embedded linux system I'm working on, cat /dev/tty0 returns keystrokes as desired (upon release and upon press). I guess that some init stuff upon boot is missing. I don't know what. Any help is appreciated.

 

 

 

 

 

 

QuoteReplyEditDelete

 

 

2009-04-20 09:36:24     Re: How to assign an arbitrary keyboard driver as console input

Michael Hennerich (GERMANY)

Message: 72876    I think you need to enable Virtual Terminal Support (CONFIG_VT) in drivers->Character devices.

-Michael

 

 

QuoteReplyEditDelete

 

 

2009-04-20 10:53:08     Re: How to assign an arbitrary keyboard driver as console input

Rob Maris (GERMANY)

Message: 72891   

 

Thanks Michael,

 

for this crucial hint. At the same time I had to specify the console as ttyBF0 in bootargs, so therefore I'm sure that I never disabled CONFIG_VT (default Bluetechnix board = off).

 

Now /dev/tty0 is present, too and it delivers the desired character stream. At this time, tty0 does not deliver an alternative code for key release events (but I think I'll get this, too).

 

I'd add a general remark in docs page gpio-keys.

 

- Rob  

Attachments

    Outcomes