Welcome 微信登录

首页 / 操作系统 / Linux / 关于Linux下鼠标键盘

关于Input设备,说明:(1)ls -l /dev/input,得到设备名称和属性,注意此处没有input号这种Input层分配的内容,以event为主。如:# ls -l /dev/input
crw-rw---- root     input     13, 66 1970-01-01 00:00 event2
crw-rw---- root     input     13, 33 1970-01-01 00:00 mouse1
crwxrwxrwx root input     13, 65 1970-01-01 00:00 event1
crw-rw---- root     input     13, 32 1970-01-01 00:00 mouse0
crw-rw---- root     input     13, 64 1970-01-01 00:00 event0
crw-rw---- root     input     13, 63 1970-01-01 00:00 mice如果这么些设备中无法确认哪个是目前在用的设备?可以采用这种方式:cat他们,然后操作鼠标或者键盘,哪个输出乱码就是用的哪个。(2)cat /proc/bus/input/devices,主要信息是:N: Name="s3c-keypad-rev0000"
P: Phys=s3c-keypad/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0N: Name="S3C TouchScreen"
P: Phys=input(ts)
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=kbd mouse0 event1N: Name="ADXL34x accelerometer"
P: Phys=1-0053/input0
S: Sysfs=/class/input/input2
U: Uniq=
H: Handlers=mouse1 event2分配的Input节点全在Sysfs上,真正的设备dev在Handlers上。(3)ls -l /sys/class/input,类设备信息:drwxr-xr-x root     root              1970-01-01 00:00 mice
drwxr-xr-x root     root              1970-01-01 00:00 input0
lrwxrwxrwx root     root            1970-01-01 00:04 event0 -> input0/event0
drwxr-xr-x root     root              1970-01-01 00:00 input1
lrwxrwxrwx root     root            1970-01-01 00:04 mouse0 -> input1/mouse0
lrwxrwxrwx root     root             1970-01-01 00:04 event1 -> input1/event1
drwxr-xr-x root     root              1970-01-01 00:00 input2
lrwxrwxrwx root     root             1970-01-01 00:04 mouse1 -> input2/mouse1
lrwxrwxrwx root     root             1970-01-01 00:04 event2 -> input2/event2Linux根文件系统(“/”文件系统)下的目录介绍Linux环境下qt/qt creator添加OpenCV的配置相关资讯      Linux教程 
  • Linux教程:如何在命令行中查看目  (07/28/2014 12:22:23)
  • Linux 修改root密码  (11/03/2012 07:53:38)
  • su - root 与su root的区别  (06/06/2012 00:39:40)
  • Linux进程间通信:消息队列  (01/28/2013 09:43:00)
  • U盘安装Linux开机无法启动解决方法  (10/07/2012 08:55:52)
  • Windows 7/Linux 同步时间  (05/15/2012 06:17:55)
本文评论 查看全部评论 (0)
表情: 姓名: 字数