Android物理键盘与虚拟键盘同时使用

来源:互联网 发布:sql修改字段绑定默认值 编辑:程序博客网 时间:2024/06/05 15:41

              修改frameworks/base/services/input/EventHub.cpp 文件,在如下代码的前面

                     // If the device isn¡¯t recognized as something we handle, don¡¯t monitor it.                  
                    if (device->classes == 0) {
                    LOGV("Dropping device: id=%d, path=¡¯%s¡¯, name=¡¯%s¡¯",
                    deviceId, devicePath, device->identifier.name.string());                         
                    delete device;                                                                           
                    return -1;                                                                               
                    }

              加入如下语句:

             device->classes &= 0xFFFF & ~INPUT_DEVICE_CLASS_ALPHAKEY;




              本资料是从网上搜集,等有时间自己写一篇分析的。

0 0
原创粉丝点击