All Board Android Getevent

cancel
Showing results for 
Search instead for 
Did you mean: 

All Board Android Getevent

All Board Android Getevent

The getevent function shows kernel events like press button events, touchscreen events, sensor events (like accelerometers or magnetometers).

bash-3.2# getevent -h

Usage: getevent [-t] [-n] [-s switchmask] [-S] [-v [mask]] [-p] [-q] [-c count] [-r] [device]

      -t: show time stamps

      -n: don't print newlines

      -s: print switch states for given bits

      -S: print all switch states

      -v: verbosity mask (errs=1, dev=2, name=4, info=8, vers=16, pos. events=32)

      -p: show possible events (errs, dev, name, pos. events)

      -q: quiet (clear verbosity mask)

      -c: print given number of events then exit

      -r: print rate events are received

Bellow an example of all events on some board

bash-3.2# getevent -p

add device 1: /dev/input/event2

  name:    "mxc_ts"

  events:

      SYN (0000): 0000  0001  0003

      KEY (0001): 014a

      ABS (0003): 0000  value 0, min 0, max 0, fuzz 0 flat 0

                        0001  value 0, min 0, max 0, fuzz 0 flat 0

                        0018  value 0, min 0, max 0, fuzz 0 flat 0

could not get driver version for /dev/input/mouse0, Not a typewriter

add device 2: /dev/input/event1

  name:    "mxc_power_key"

  events:

    SYN (0000): 0000  0001

    KEY (0001): 003e

add device 3: /dev/input/event0

  name:    "mxckpd"

  events:

    SYN (0000): 0000  0001

    KEY (0001): 0002  0003  0004  0005  003b  003c  003d  003e

                      0066  0067  0069  006a  006c  008b  009e  0161

could not get driver version for /dev/input/mice, Not a typewriter

For example, some touchscreen event. Any touchscreen press-up or press-down will return a vector of values related with the event (please, see include/linux/input.h for detail)

bash-3.2# getevent /dev/input/event2

0003 0000 0000020e

0003 0001 0000014a

0003 0018 00000037

0001 014a 00000001

0000 0000 00000000

0003 0000 00000209

0003 0001 00000147

Labels (1)
Tags (2)
Version history
Revision #:
1 of 1
Last update:
‎08-03-2012 03:50 PM
Updated by: