Advertisement
Guest User

Untitled

a guest
Jul 10th, 2014
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
  2. N: Name="AT Translated Set 2 keyboard"
  3. P: Phys=isa0060/serio0/input0
  4. S: Sysfs=/devices/platform/i8042/serio0/input/input2
  5. U: Uniq=
  6. H: Handlers=sysrq kbd event2
  7. B: PROP=0
  8. B: EV=120013
  9. B: KEY=20000 200 20 0 0 0 0 500f 2100002 3803078 f900d401 feffffdf ffefffff ffffffff fffffffe
  10. B: MSC=10
  11. B: LED=7
  12.  
  13. 1 = 0001
  14. 2 = 0010
  15. 3 = 0011
  16. 4 = 0100
  17. 5 = 0101
  18. ...
  19.  
  20. A = 1, 001
  21. B = 2, 010
  22. C = 4, 100
  23.  
  24. MYVAR & A == TRUE (101 & 001 => 001)
  25. MYVAR & B == FALSE (101 & 010 => 000)
  26. MYVAR & C == TRUE (101 & 100 => 100 )
  27.  
  28. A = 0
  29. B = 1
  30. C = 6
  31. ...
  32.  
  33. target = 0;
  34. set_bit(A, target); => target == 0001
  35. set_bit(C, target); => target == 0100 0001
  36.  
  37. 0x120013 == 0001 0010 0000 0000 0001 0011 binary
  38. 1 2 0 0 1 3
  39.  
  40. 2 1 <= offset (10's)
  41. 3210 9876 5432 1098 7654 3210 <= offset (counted from right)
  42. 0001 0010 0000 0000 0001 0011 <= binary
  43.  
  44. Set bits are:
  45. 0, 1, 4, 17, 20
  46.  
  47. 0 EV_SYN (0x00)
  48. 1 EV_KEY (0x01)
  49. 4 EV_MSC (0x04)
  50. 17 EV_LED (0x11)
  51. 20 EV_REP (0x14)
  52.  
  53. * EV_SYN:
  54. - Used as markers to separate events. Events may be separated in time or in
  55. space, such as with the multitouch protocol.
  56.  
  57. * EV_KEY:
  58. - Used to describe state changes of keyboards, buttons, or other key-like
  59. devices.
  60.  
  61. * EV_MSC:
  62. - Used to describe miscellaneous input data that do not fit into other types.
  63.  
  64. * EV_LED:
  65. - Used to turn LEDs on devices on and off.
  66.  
  67. * EV_REP:
  68. - Used for autorepeating devices.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement