新内核开发:"虚拟"在内核中输入驱动器? [英] New to kernel development: "Virtual" input driver in kernel?
问题描述
我正在做一些编辑输入设备驱动程序在Android的内核。
I'm doing some edits to an input device driver in an android kernel.
该设备已启用keybits和evbits范围有限。我想要做的是创建一个与任何物理设备,更keybits和evbits启用新的/ dev /输入事件节点,这样我就可以发送实时输入信号从物理驱动器的用户空间,在用户空间我听他们收到时我可以注入输入事件的虚拟驱动程序写入到其事件的节点。
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.
难道的Linux / Android的内核提供了这样的选择?我应该遵循哪些路径?有没有什么可以替代的?
Does linux/android kernel offer such option? Which path should I follow? Is there any alternative to this?
作为第二选择,可以创建在同一个驱动器两个输入节点和发送input_reports只有物理节点?
As a second option, can I create two input nodes in the same driver and send input_reports only to the "physical" node?
推荐答案
我看到两个选择:
-
创建虚拟输入设备 - 你可以写你自己的驱动程序,或者使用的 uinput
绕道低电平输入susbsystem和注入关键事件在Android框架水平
Bypass low-level input susbsystem and inject key events at the Android framework level
这篇关于新内核开发:"虚拟"在内核中输入驱动器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!