Android中的keychord作用
来源:互联网 发布:手机效率软件 编辑:程序博客网 时间:2024/05/16 15:12
看代码时候发现keychords这个文件
用户空间的代码在: system/core/init/keychords.c
内核驱动的代码在: drivers/input/misc/keychord.c
chords意思是和弦,钢琴和吉他都有和弦,意思就是多个键一起按,顾名思义,keychords应该就是处理多点触摸的接口。看看初始化代码:
主要是通过/dev/keychord文件节点和底层驱动进行交互。
void keychord_init()
{
int fd, ret;
service_for_each(add_service_keycodes);
/* nothing to do if no services require keychords */
if (!keychords)
return;
fd = open("/dev/keychord", O_RDWR);
if (fd < 0) {
ERROR("could not open /dev/keychord\n");
return;
}
fcntl(fd, F_SETFD, FD_CLOEXEC);
ret = write(fd, keychords, keychords_length);
if (ret != keychords_length) {
ERROR("could not configure /dev/keychord %d (%d)\n", ret, errno);
close(fd);
fd = -1;
}
free(keychords);
keychords = 0;
keychord_fd = fd;
}
- Android中的keychord作用
- Android中的inflate作用
- android中的Application的作用
- android中的Application的作用
- android中的Application的作用
- android中的handler的作用
- android中的Application的作用
- android中的Application的作用
- mk中的android:sharedUserId和LOCAL_CERTIFICATE作用
- 测试人员在Android项目中的作用
- Android中的XML文件的作用介绍
- mk中的android:sharedUserId和LOCAL_CERTIFICATE作用
- android 布局中的layout_weight的作用
- mk中的android:sharedUserId和LOCAL_CERTIFICATE作用
- adb在ANDROID设备中的作用
- mk中的android:sharedUserId和LOCAL_CERTIFICATE作用
- Android中的意图匹配--IntentFilter的作用
- Android中的XML文件的作用介绍
- hdu 4704 费马小定理+快速幂
- 向目标窗口发送字符串消息
- freeswitch中IVR的menu设置中使用phrase
- 怎样把pdf转换成excel转换器
- SNMP安装
- Android中的keychord作用
- fd针对air开发的小技巧: 最小化dos窗口和debug独立模式
- Notification(三)——点Notification后返回当前App所在的Activity
- UVA 10494 (暑假-高精度 -D - If We Were a Child Again)
- java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.....
- Remove Nth Node From End of List
- 倒立摆
- 文件读写: 二进制方式和文本方式的区别
- 代码可读性优化