Android, X Windows, QT, and many other applications support input devices, such as the keyboard, mouse, and touch screen, in Linux systems, or increasingly prefer the standard input subsystem.
Because the input subsystem has completed the character-driven file operation interface, the core task of writing the driver is to complete the interface set aside by the input system, with little workload. But if you want to apply it more flexibly, You need to analyze the input subsystem.
IInput subsystem framework
It is the framework of the input subsystem. The input subsystem consists of three parts: the input core, the driver, and the event handler. An input event, such as moving the mouse, pressing the keyboard, and moving joystick, arrives at the user space through input driver-> input core-> event handler-> userspace and passes it to the application.
Note: keyboard. C does not generate nodes under/dev/input, but serves as the input of the ttyn terminal (excluding the serial port terminal.
Displays the layers of input device drivers in Linux.