/ dev / keyboard input format

I played with capturing input from my device on the keyboard:

/dev/input/by-path/platform-i8042-serio-0-event-kbd 

for me, and I was wondering if there is any specification of what it returns using

od -tx1 /dev/input/by-path/platform-i8042-serio-0-event-kbd 

to listen. I'm curious mainly because of the behavior of certain keys; meta, arrow keys, slash with slash.

0520300 ac 9d 86 4c 6b 0f 04 00 04 00  04  00 (db) 00 00 00
0520320 ac 9d 86 4c 8c 0f 04 00 01 00 (7d) 00  00 00 00 00
0520340 ac 9d 86 4c 95 0f 04 00 00 00  00  00  00 00 00 00

Every other key I have looked at so far has two bytes in parentheses as matching values, is there any reason, peculiarity?

+5
source share
2 answers

/dev/input/by-path/platform-i8042-serio-0-event-kbd- This is just a symbolic link to the event device file /dev/input/eventX. Data can be read from event device files as

struct input_event {
    struct timeval time;
    __u16 type;
    __u16 code;
    __s32 value;
};

defined in /usr/include/linux/input.h.

type EV_. code type. KEY_ BTN_ REL_ . value type, code. , value 1 0.

:

evtest /dev/input/eventX

X - ( ). (EV_MSC, EV_KEY EV_SYN).

+12

...

: http://www.beyondlogic.org/keyboard/keybrd.htm ( ):

101 8 256 , , ?

. , , , , , . E0 (hex). . E1,14,77, E1, F0,14, F0,77! ? . , Pause/Break. , ! , - ?

+3

All Articles