Skip to content

Kernel Datastream Example

Ping Cheng edited this page Oct 12, 2020 · 6 revisions

Data stream obtained with evtest. This data stream is valid for an Intuos Pro USB device as of October 2020.

Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x56a product 0x357 version 0x110
Input device name: "Wacom Intuos Pro M Pen"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 320 (BTN_TOOL_PEN)
    Event code 321 (BTN_TOOL_RUBBER)
    Event code 322 (BTN_TOOL_BRUSH)
    Event code 323 (BTN_TOOL_PENCIL)
    Event code 324 (BTN_TOOL_AIRBRUSH)
    Event code 326 (BTN_TOOL_MOUSE)
    Event code 327 (BTN_TOOL_LENS)
    Event code 329 (?)
    Event code 330 (BTN_TOUCH)
    Event code 331 (BTN_STYLUS)
    Event code 332 (BTN_STYLUS2)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value      0
      Min        0
      Max    44800
      Fuzz       4
      Resolution     200
    Event code 1 (ABS_Y)
      Value      0
      Min        0
      Max    29600
      Fuzz       4
      Resolution     200
    Event code 2 (ABS_Z)
      Value      0
      Min     -900
      Max      899
      Resolution     287
    Event code 8 (ABS_WHEEL)
      Value      0
      Min        0
      Max     2047
    Event code 24 (ABS_PRESSURE)
      Value      0
      Min        0
      Max     8191
    Event code 25 (ABS_DISTANCE)
      Value      0
      Min        0
      Max       63
    Event code 26 (ABS_TILT_X)
      Value      0
      Min      -64
      Max       63
      Resolution      57
    Event code 27 (ABS_TILT_Y)
      Value      0
      Min      -64
      Max       63
      Resolution      57
    Event code 40 (ABS_MISC)
      Value      0
      Min   -2147483648
      Max   2147483647
  Event type 4 (EV_MSC)
    Event code 0 (MSC_SERIAL)
Properties:
  Property type 0 (INPUT_PROP_POINTER)

Some notes about the usage of the above values:

  • ''ABS_MISC'' is used for the tool ID.
  • ''MSC_SERIAL'' is used for the tool serial numbers.
  • ''BTN_TOOL_PEN'' and ''BTN_TOOL_RUBBER'' are the two indicators for pen or eraser (in X11 driver lingo), thus if ''BTN_TOOL_PEN'' is set, the front end of the stylus is in proximity.
  • ''BTN_TOUCH'' indicates if the current tool (pen/eraser) is touching the surface.
  • ''BTN_STYLUS'' and ''BTN_STYLUS2'' are the side buttons on the pen.

Example for Eraser usage, first proximity then touch:

Event: time 1602304891.339001, type 3 (EV_ABS), code 0 (ABS_X), value 13837
Event: time 1602304891.339001, type 3 (EV_ABS), code 1 (ABS_Y), value 14160
Event: time 1602304891.339001, type 3 (EV_ABS), code 26 (ABS_TILT_X), value -31
Event: time 1602304891.339001, type 3 (EV_ABS), code 27 (ABS_TILT_Y), value 2
Event: time 1602304891.339001, type 3 (EV_ABS), code 2 (ABS_Z), value 450
Event: time 1602304891.339001, type 3 (EV_ABS), code 25 (ABS_DISTANCE), value 63
Event: time 1602304891.339001, type 1 (EV_KEY), code 321 (BTN_TOOL_RUBBER), value 1
Event: time 1602304891.339001, type 4 (EV_MSC), code 0 (MSC_SERIAL), value -1149235178
Event: time 1602304891.339001, type 3 (EV_ABS), code 40 (ABS_MISC), value 2058
Event: time 1602304891.339001, -------------- SYN_REPORT ------------

...

Event: time 1602304891.506966, type 3 (EV_ABS), code 0 (ABS_X), value 12684
Event: time 1602304891.506966, type 3 (EV_ABS), code 1 (ABS_Y), value 12275
Event: time 1602304891.506966, type 3 (EV_ABS), code 24 (ABS_PRESSURE), value 336
Event: time 1602304891.506966, type 3 (EV_ABS), code 25 (ABS_DISTANCE), value 8
Event: time 1602304891.506966, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1602304891.506966, type 4 (EV_MSC), code 0 (MSC_SERIAL), value -1149235178
Event: time 1602304891.506966, -------------- SYN_REPORT ------------

Example for pad usage (PAD ID is 15):

Event: time 1602304499.355859, type 1 (EV_KEY), code 264 (BTN_8), value 1
Event: time 1602304499.355859, type 3 (EV_ABS), code 40 (ABS_MISC), value 15
Event: time 1602304499.355859, -------------- SYN_REPORT ------------
Event: time 1602304499.645853, type 1 (EV_KEY), code 264 (BTN_8), value 0
Event: time 1602304499.645853, type 3 (EV_ABS), code 40 (ABS_MISC), value 0
Event: time 1602304499.645853, -------------- SYN_REPORT ------------
Event: time 1602304502.898821, type 1 (EV_KEY), code 263 (BTN_7), value 1
Event: time 1602304502.898821, type 3 (EV_ABS), code 40 (ABS_MISC), value 15
Event: time 1602304502.898821, -------------- SYN_REPORT ------------
Event: time 1602304503.148888, type 1 (EV_KEY), code 263 (BTN_7), value 0
Event: time 1602304503.148888, type 3 (EV_ABS), code 40 (ABS_MISC), value 0
Event: time 1602304503.148888, -------------- SYN_REPORT ------------
Event: time 1602304534.052501, type 3 (EV_ABS), code 8 (ABS_WHEEL), value 12
Event: time 1602304534.052501, type 3 (EV_ABS), code 40 (ABS_MISC), value 15
Event: time 1602304534.052501, -------------- SYN_REPORT ------------
Clone this wiki locally