问题
I'm doing some edits to an input device driver in an android kernel.
This device has a limited range of keybits and evbits enabled. What I want to do is to create a new /dev/input event node that is not related to any physical device, with more keybits and evbits enabled, so that I can send real input signals from the physical driver to the userspace, in the userspace I listen to them and when received I can inject input events to the "virtual" driver writing to its event node.
Does linux/android kernel offer such option? Which path should I follow? Is there any alternative to this?
As a second option, can I create two input nodes in the same driver and send input_reports only to the "physical" node?
回答1:
I see two alternatives:
Create virtual input device - you can write your own driver or use uinput
Bypass low-level input susbsystem and inject key events at the Android framework level
来源:https://stackoverflow.com/questions/16420959/new-to-kernel-development-virtual-input-driver-in-kernel