LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /dev/input/even0 strange output (https://www.linuxquestions.org/questions/linux-newbie-8/dev-input-even0-strange-output-4175478247/)

w1ze 09-23-2013 02:56 PM

/dev/input/even0 strange output
 
I'm trying to capture my key strokes, this is what i get

cat /dev/input/event0
«‰AR5
«‰AR5
«‰AR5
&¬‰AR*‰ARô*‰ARù*‰ARû*‰AR.*‰AR.*‰AR^C &¬‰AR

As far as i know it should print everything in hexadecimal, might it be charset issue or something?

When i try 'showkey' everything works just fine.

rigor 09-23-2013 03:58 PM

Hi w1ze!

AFAIK, /dev/input/event[0-9] is more than just the characters pressed on the keyboard. E.G., see man pages such as evdev.

This command sequence:

Code:

strings -a `which showkey` | fgrep -i dev
gives me this output:

Code:

since the X server is also reading /dev/console ]
/dev/tty
/dev/tty0
/dev/vc/0
/dev/console

which may suggest that showkey might not be using /dev/input/event[0-9], is likely using the other devices.


It may be different in your system, but on mine, these files have a variety of information on keyboard operation:

Code:

/usr/share/doc/packages/kbd/doc/kbd.FAQ*.html

In particular, this one, talks about scan codes:

Code:

/usr/share/doc/packages/kbd/doc/kbd.FAQ-2.html

HTH.


All times are GMT -5. The time now is 02:07 AM.