• Home
  • History
  • Annotate
  • only in /external/autotest/client/bin/input/
History log of /external/autotest/client/bin/input/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9dfa960af3f7b56ef52291d3c7e21f52770ee381 05-Sep-2016 Joseph Hwang <josephsih@chromium.org> client/bin/input: add an input_event_recorder module

Add an input_event_recorder module to record input events received on a DUT.

BUG=chromium:680378
TEST=Record mouse events on a Samus
$ python input_event_recorder.py
Then move a wired mouse around, click buttons, and scroll wheels.
Observe the mouse events are recorded correctly.

Change-Id: I97ca22831de5ae1d80a5d2a15dda042e172afece
Reviewed-on: https://chromium-review.googlesource.com/381153
Commit-Ready: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
nput_event_recorder.py
13e353729c400d029e9167ded3cdc3032cbf8411 02-Dec-2016 Chung-yih Wang <cywang@google.com> input_device: Add get_device_node() from keyboard_device.py

The function get_device_node() is for retrieveing the device node of
a given device type in general and is better to reside in input_device library.

BUG=none
TEST=none

Change-Id: I85db052eda97df34c29318e5245ce4747bf9db48
Signed-off-by: Chung-yih Wang <cywang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/415653
Reviewed-by: Ben Cheng <bccheng@chromium.org>
nput_device.py
3ad5164cfaa536b2f71a9098545c39d10ad74cd7 22-Jan-2015 David Sodman <dsodman@chromium.org> Replace "showkey" with client autotest

FAFTSetup, ECLidSwitch, and ECPowerButton all rely on
the showkey utility which doesn't run on freon. So,
this change adds a client side autotest that reads
evdev input and verifies it matches the passed in
expected output, and then modifies each of the
aforementioned tests to invoke the client side test

BUG=chrome-os-partner:35025
TEST=run FAFTSetup on Peppy with servo and verify that
the correct keys sent pass, incorrect keys sent fail
with "Keys mismatched" and no keys sent fail with
"No keys pressed"

Change-Id: I3b667a91b7f2ed84a6e91460f554d53a857a1373
Reviewed-on: https://chromium-review.googlesource.com/266771
Tested-by: danny chan <dchan@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
Reviewed-by: David Sodman <dsodman@chromium.org>
Commit-Queue: danny chan <dchan@chromium.org>
nput_device.py
40117bbc14a6000e313449dcbc0307c4d432c0f9 05-Aug-2014 Joseph Hwang <josephsih@chromium.org> input_device: use slot id in print_slots

Print the slot id instead of the slot index in print_slots().

BUG=chromium:397397
TEST=None.

Change-Id: Ibc34c5f5287458a942e353a4b8a9740b5194698d
Reviewed-on: https://chromium-review.googlesource.com/211070
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
nput_device.py
33632c432c0e749488adcb82cf8d63c509fb6b46 24-Jul-2014 Joseph Hwang <josephsih@chromium.org> input_device: sync mt slots with kernel

In the class InputDevice, when setting up mt slots, let it also
sync with kernel to get the slots information. Print the slot
information when this module is executed as a script.

BUG=chromium:397397
TEST=Place 2 fingers on the touchpad, and run input_device as
$ /usr/local/autotest/bin/input/input_device.py -t

It would show two slots information representing the two finger
in the header like
.
.
.
$ x: (0,2948), y: (0,1604), z: (0, 255)
slot #0
MT_TOUCH_MAJOR = 280
MT_TOUCH_MINOR = 260
MT_POSITION_X = 927
MT_POSITION_Y = 809
MT_TRACKING_ID = 1450
MT_PRESSURE = 69
slot #1
MT_TOUCH_MAJOR = 280
MT_TOUCH_MINOR = 260
MT_POSITION_X = 1754
MT_POSITION_Y = 460
MT_TRACKING_ID = 1451
MT_PRESSURE = 64
Number of fingers: 2
Current slot id: 1
.
.
.

Change-Id: I6e7e03c2880771d38d12ad1fe038c8f587891fd7
Reviewed-on: https://chromium-review.googlesource.com/209737
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
nput_device.py
b23d9138d65ab68907515e46acc2753a8ccf3f1b 24-Jul-2014 Joseph Hwang <josephsih@chromium.org> linux_input: add support for EVIOCGMTSLOTS

This patch adds the support for EVIOCGMTSLOTS to sync with the
kernel evdev driver for the mt slots information. The information
would be useful to detect if there are ghost fingers.

BUG=chromium:397397
TEST=None. Will be tested with next related patch.

Change-Id: Id0c7eda5f227ecc66dd4c9b3d2aab880f340f5b6
Reviewed-on: https://chromium-review.googlesource.com/209736
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
inux_input.py
32ad2058dfe344211ab5c955afeb59c52f4f42da 23-Jul-2014 Joseph Hwang <josephsih@chromium.org> linux_input: add BTN_TOOL_QUINTTAP in EV_STRINGS

This patch adds the event string for BTN_TOOL_QUINTTAP so that
it would show BTN_TOOL_QUINTTAP instead of '?' when running the
input_device module.

BUG=chromium:397397
TEST=Run the input_device module on a chromebook:
$ /usr/local/autotest/bin/input/input_device.py -t

Observe that it would show in the header

Event code BTN_TOOL_QUINTTAP (328)

instead of

Event code ? (328)

Change-Id: Iea9ca5bd1973afd786ea89043e4d3e0017815adb
Reviewed-on: https://chromium-review.googlesource.com/209735
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Shyh-In Hwang <josephsih@chromium.org>
inux_input.py
218d3bee94f350b9b4eab77512a9849969baf412 07-Nov-2012 Hsin-Yu Chao <hychao@chromium.org> Autotest input: Add functions for audio jack event devices.

Mic/Headphone Jack is not exposed to mixer control for arm device.
Add functions for input_device.py to get the jack plug/unplug status
from /dev/input/event*.

BUG=chromium-os:36035
TEST=Manual run these functions on arm device.

Change-Id: Id0d0b305af92144081b439b9ec9bdc64b0ee70cd
Reviewed-on: https://gerrit.chromium.org/gerrit/37518
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
nput_device.py
3a18c3c591fc04fc7cb532015bc1f14c0a314991 19-Oct-2012 Cheng-Yi Chiang <cychiang@chromium.org> input_device: fix the way python open input node

To open the input event node /dev/input/event*, we should specify buffering=0
so python will not buffer the event. Fix this bug so factory_Touchpad
test can get instant touchpad input. This is needed to correctly detect
clicking event in factory_Touchpad test.
Also, open file in binary mode to prevent something weird happens in text
mode.

BUG=chrome-os-partner:15448
TEST=/usr/local/autotest/bin/input/input_device.py -d /dev/input/event1
check that clicking event can be detected instantly right after clicking the touchpad.
that is , EV_KEY[LEFT] = 1 and EV_KEY[LEFT] = 0 are shown each time
after clicking. Without this CL, sometimes EV_KEY[LEFT] = 0 will not
show instantly.

Change-Id: Ifc3de42b806fff23f19f874c4285489c8dc130d0
Reviewed-on: https://gerrit.chromium.org/gerrit/36044
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
nput_device.py
8c8ba83ec896639ecf389276a909c8bd24701ff7 26-Sep-2012 Joseph Hwang <josephsih@chromium.org> linux_input: add BTN_TOOL_QUINTTAP

Add BTN_TOOL_QUINTTAP to support the event for 5 fingers touching
the touchpad.

BUG=chromium-os:34269
TEST=None. To be tested with next CL.

Change-Id: Iead9723018bc9ca2955f9d756a521025f0f8362f
Reviewed-on: https://gerrit.chromium.org/gerrit/34182
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Commit-Ready: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
inux_input.py
8df853ddd52d70f781845d1fa99f384b10e49589 14-Apr-2012 Chung-yih Wang <cywang@chromium.org> Add SYN_DROPPED test

The test bombards the evdev kernel driver to generate SYN_DROPPED event(s)
as the queue inside will be filled up quickly. Therefore, we should be able
to see the SYN_DROPPED event and process it inside CMT driver by examining
the log file Xorg.0.log.

BUG=chromium-os:28997
TEST=run the test and it should succeed if we have the sync. logic implemented,
or fail if not.

Change-Id: I9a0622db7980ec46900dbf00ae6bcf026b2d7fdd
Reviewed-on: https://gerrit.chromium.org/gerrit/20283
Commit-Ready: Chung-yih Wang <cywang@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Tested-by: Chung-yih Wang <cywang@chromium.org>
nput_device.py
nput_event_player.py
fabe61de3a9747126b5fe2b77ad0e17d93f7e043 05-Apr-2012 Hsinyu Chao <hychao@chromium.org> Add factory_Touchscreen test

For now, most of the code is borrowed from factory_Touchpad,
will need some refactor to reduce the duplicate code after
the factory_Touchscreen is more mature.

BUG=chrome-os-partner:7949
TEST=Manual run factory_Touchscreen test works well

Change-Id: I1a1042e99c1631acaff17a040c7002c81a0a629b
Reviewed-on: https://gerrit.chromium.org/gerrit/19817
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
nput_device.py
eecf47d5a742e081260e885b5fd190ea5207eab5 18-May-2011 Daniel Kurtz <djkurtz@chromium.org> Make /client/bin/input a package

BUG=chromium-os:12425
TEST=none

Change-Id: Id2865d8074977ac230629845147324f619674479
Reviewed-on: http://gerrit.chromium.org/gerrit/3631
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
_init__.py
ff12d4253a817372f5fe81e89bfdc2be2a9c4204 18-May-2011 Daniel Kurtz <djkurtz@chromium.org> Add linux_ioctl

This helper file is a python version of linux header:
include/asm-generic/ioctl.h

It defines constants and helper functions for defining ioctls.

BUG=chromium-os:12425
TEST=none

Change-Id: I4f39daead21e371178ff8a1959331757138e3137
Reviewed-on: http://gerrit.chromium.org/gerrit/3632
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
inux_ioctl.py
431a3815bde8aa9633322d634a9c7d2eceed21d0 18-May-2011 Daniel Kurtz <djkurtz@chromium.org> Add linux_input

This helper file is a python version of linux header:
include/linux/input.h

It defines the constants and helper functions of the linux input subsystem.

BUG=chromium-os:12425
TEST=none

Change-Id: Ifad64d063cee33536f6e4d60b05b3b213c7cb173
Reviewed-on: http://gerrit.chromium.org/gerrit/3633
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
inux_input.py
ecc7a0eae5502becdf51280b1b38109b9e421a4d 18-May-2011 Daniel Kurtz <djkurtz@chromium.org> Add input_device

Add a class for handling linux 'evdev' input devices.

By itself, this module can be run as a python version of the "evtest"
tool, or the InputDevice class can be used in other python scripts.

BUG=chromium-os:12425
TEST=(1) input_device -d /dev/input/event4
-> Display device info, and show incoming input events
(2) input_device -t
-> Auto detect a touchpad device, display its props, then show
events.

Change-Id: Ibaa14f54617f85070212347e5685d0c51598f321
Reviewed-on: http://gerrit.chromium.org/gerrit/3634
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
nput_device.py