What dev do I use to read a USB keyboard on an embedded Linux system?

I have compiled a kernel to support USB HID and keyboard devices. When I plug in a USB keyboard, the kernel recognizes it and comes to the point of locking / unlocking NUMLOCK when I press the same key.

Is there a dev file entry that I can create so that I can read data ( cat /dev/input/... ) from the USB keyboard?

I appreciate that I can look at the scan codes.

I tested the USB HID with the mouse, although it creates garbage on the console, I know that it is related to using the information I found here .


EDIT-Ignacio

How can I match the following to a dev entry, in particular, where can I get the minor version number?

 # cat /proc/bus/input/devices I: Bus=0003 Vendor=046d Product=c316 Version=2800 N: Name="Logitech Logitech USB Keyboard" P: Phys=usb-at91rm9200-1.1/input0 H: Handlers=kbd B: EV=120003 B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe B: LED=1f I: Bus=0003 Vendor=046d Product=c316 Version=2800 N: Name="Logitech Logitech USB Keyboard" P: Phys=usb-at91rm9200-1.1/input1 H: Handlers=kbd B: EV=3 B: KEY=9f01 400 40000 401878 d800d508 1e0000 0 0 0 
+4
source share
1 answer

Once you have scanned /proc/bus/input/devices for the corresponding event device, you can use MAKEDEV to create it (symbol, main number 13, minor number 64+) and access it as usual .

+1
source

All Articles