androidlinux-kernellinux-device-driverandroid-keypad

New to kernel development: "Virtual" input driver in kernel?


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?


Solution

  • I see two alternatives:

    1. Create virtual input device - you can write your own driver or use uinput

    2. Bypass low-level input susbsystem and inject key events at the Android framework level