• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5# pytype: skip-file
6
7# This script is to be run directly on a ChromeOS device to query and return
8# the touch device information.
9
10import logging
11import sys
12
13sys.path.append("/usr/local/autotest/bin")
14
15# pylint: disable=wrong-import-position
16import common  # pylint: disable=unused-import
17from autotest_lib.client.bin.input import input_device
18from autotest_lib.client.cros.input_playback import input_playback
19
20logging.disable(logging.ERROR)
21
22playback = input_playback.InputPlayback()
23playback.find_connected_inputs()
24touchscreen_node = playback.devices["touchscreen"].node
25touchscreen = input_device.InputDevice(touchscreen_node)
26
27# This output is parsed by crossbench:
28print(touchscreen_node, touchscreen.get_x_max(), touchscreen.get_y_max())
29