Search code examples
linuxeventsdevisekeyboard-eventsinput-devices

How to read /dev/input/eventX


I want to read input-data (keyboard-input) from the /dev/input/eventX-Files. I thought, I find the informations in:

lrwxrwxrwx 1 root root 9 19. Feb 07:45 usb-_USB_Keyboard-event-if01 -> ../event4
lrwxrwxrwx 1 root root 9 19. Feb 07:45 usb-_USB_Keyboard-event-kbd -> ../event3

But when I read the events, they are empty. The date and time of the files (read with ls -l) suggest that they does not have changed since system boot.

Can somebody tell me how to get such informations like keyboard-input.

Gruß, Andre

Solution: When I was logged in as root today it worked, I could read the input from the keyboard.


Solution

  • Solution: When I was logged in as root today it worked, I could read the /dev/input/event*-device.

    So it was a permission-issue.