转自:https://unix.stackexchange.com/questions/74903/explain-ev-in-proc-bus-input-devices-data

It represent the bitmask for events supported by the device.

Sample of devices entry for a AT Keyboard:

I: Bus= Vendor= Product= Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input2
U: Uniq=
H: Handlers=sysrq kbd event2
B: PROP=
B: EV=
B: KEY= 500f f900d401 feffffdf ffefffff ffffffff fffffffe
B: MSC=
B: LED= The B in front stands for bitmap, N, P, S, U, H are simply first letter in corresponding name value and I is for ID. In ordered fashion: I => @id: id of the device (struct input_id)
Bus => id.bustype
Vendor => id.vendor
Product => id.product
Version => id.version
N => name of the device.
P => physical path to the device in the system hierarchy.
S => sysfs path.
U => unique identification code for the device (if device has it).
H => list of input handles associated with the device.
B => bitmaps
PROP => device properties and quirks.
EV => types of events supported by the device.
KEY => keys/buttons this device has.
MSC => miscellaneous events supported by the device.
LED => leds present on the device. Bitmasks As you know computers deal in binary, so: =
=
=
=
=
... So if i have a bitmap with value that one would hold bits and in other word one can give each number a name and check if they correspond to a value. E.g. A = ,
B = ,
C = , Then if I have MYVAR = which is in binary this would check out: MYVAR & A == TRUE ( & => )
MYVAR & B == FALSE ( & => )
MYVAR & C == TRUE ( & => ) Thus my var has A and C. The kernel uses a bit more sophisticated/complex way, and set bits by offset. One reason being that more bits then is available in one computer (CPU) integer is used. For example look at the KEY bitmap. So, if we say: A =
B =
C =
... And then target = ;
set_bit(A, target); => target ==
set_bit(C, target); => target == Decoding The value is a hexadecimal. As binary it gives us: 0x120013 == binary Numbered from right they are: <= offset ('s)
<= offset (counted from right)
<= binary Set bits are:
, , , , Then check input.h you find that they correspond to: EV_SYN (0x00)
EV_KEY (0x01)
EV_MSC (0x04)
EV_LED (0x11)
EV_REP (0x14) To check what they mean a quick introduction is given by kernel Documentation. * EV_SYN:
- Used as markers to separate events. Events may be separated in time or in
space, such as with the multitouch protocol. * EV_KEY:
- Used to describe state changes of keyboards, buttons, or other key-like
devices. * EV_MSC:
- Used to describe miscellaneous input data that do not fit into other types. * EV_LED:
- Used to turn LEDs on devices on and off. * EV_REP:
- Used for autorepeating devices. This, "EDIT 2 (continued):" in particular, might be of interest.

Explain EV in /proc/bus/input/devices data【转】的更多相关文章

  1. cannot open /proc/bus/usb/devices, No such file or directory

    由于kernel config中没有打开对应的配置. make menuconfig 选择: Device Drivers ---> [*] USB support ---> [*] US ...

  2. linux下bus、devices和platform的基础模型

    转自:http://blog.chinaunix.net/uid-20672257-id-3147337.html 一.kobject的定义:kobject是Linux2.6引入的设备管理机制,在内核 ...

  3. linux下bus、devices和platform的基础模型 【转】

    转自:http://blog.chinaunix.net/uid-20672257-id-3147337.html 一.kobject的定义:kobject是Linux2.6引入的设备管理机制,在内核 ...

  4. 12、API - 输入设备(API - Input Devices)

    学习目录:树莓派学习之路-GPIO Zero 官网地址:https://gpiozero.readthedocs.io/en/stable/api_input.html 环境:UbuntuMeta-1 ...

  5. Linux input子系统 io控制字段【转】

    转自:http://www.cnblogs.com/leaven/archive/2011/02/12/1952793.html http://blog.csdn.net/guoshaobei/arc ...

  6. Linux Input子系统浅析(二)-- 模拟tp上报键值【转】

    转自:https://blog.csdn.net/xiaopangzi313/article/details/52383226 版权声明:本文为博主原创文章,未经博主允许不得转载. https://b ...

  7. input上报流程分析【转】

    转自:http://blog.chinaunix.net/uid-28320320-id-3389196.html .参考文章 [Andorid]input系统的事件处理 .源码分析 linux )查 ...

  8. linux input输入子系统应用分析

    输入设备(如按键.键盘.触摸屏.鼠标等)是典型的字符设备,其一般的工作机理是底层在按键.触摸等动作发送时产生一个中断(或驱动通过timer定时查询),然后CPU通过SPI.I2 C或外部存储器总线读取 ...

  9. Input event驱动

    Input event驱动 Linux 专门对输入设备. 键盘,鼠标,手柄,触摸屏.按键.封装一个类驱动. 主要统一与应用程序接口.这一类的设备结点都是在/dev/input/eventn( 0< ...

随机推荐

  1. LeetCode-----算法448.找到所有数组中消失的数字

    题目: 给定一个范围在  1 ≤ a[i] ≤ n ( n = 数组大小 ) 的 整型数组,数组中的元素一些出现了两次,另一些只出现一次. 找到所有在 [1, n] 范围之间没有出现在数组中的数字. ...

  2. 20150519 开始第一个Sprint

    一.模仿并超越--类似应用. 观赏了各队的NABCD分析和产品BACKLOG,觉得大家还有潜力进一步打开思路. 各队首先去广泛研究一下与拟做项目类似的应用,对其中比较优秀的(不少于五个)进行深入试用, ...

  3. ecshop ueditor实现百度编辑器

    ecshop后台编辑器替换成ueditor编辑器 投稿:hebedich 字体:[增加 减小] 类型:转载   这篇文章主要介绍了ecshop后台编辑器替换成ueditor编辑器的详细过程,这里推荐给 ...

  4. 2013长春网赛1001 hdu 4759 Poker Shuffle

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4759 题意:有一堆2^n的牌,牌原先按(1,2,....k)排序,每一次洗牌都将牌分成两种情况:(1, ...

  5. nodejs nodemailer 使用

    index.js const nodemailer=require("nodemailer") let sendEmail=function () { var transporte ...

  6. 51nod 1463 找朋友 (扫描线+线段树)

    1463 找朋友  基准时间限制:1.5 秒 空间限制:262144 KB 分值: 80 难度:5级算法题  收藏  关注 给定: 两个长度为n的数列A .B 一个有m个元素的集合K 询问Q次 每次询 ...

  7. 杭高OI20190125 (genies出题)

    /* 当一个人先从自己的内心开始奋斗,他就开始迈向了成功 ——genies (朝阳的二愣子) */ HGOI寒假赛第一场,欢迎来自各种学校的各式各样的巨老233333 感觉自己好渺小.还是NOIP ( ...

  8. raft 论文

    raft 论文,摘自  http://www.infoq.com/cn/articles/raft-paper raft动画:https://raft.github.io/ raft说明动画:

  9. 【洛谷P2661】信息传递 (updated)

    题目大意:给定一棵 N 个节点的内向树森林,求该内向树森林的最小环的大小(按边计算). 题解:先删链,再计算环的大小,统计答案即可. 代码如下 #include <bits/stdc++.h&g ...

  10. 界面编程之QT绘图和绘图设备20180728

    /*******************************************************************************************/ 一.绘图 整 ...