New to kernel development: “Virtual” input driver in kernel?

别来无恙 提交于 2019-12-09 14:05:30

问题


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:

  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



来源:https://stackoverflow.com/questions/16420959/new-to-kernel-development-virtual-input-driver-in-kernel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!