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 redirect characters 8# read from stdin to be typed on an emulated keyboard device. 9 10import sys 11 12import uinput.cros_keys 13 14while True: 15 char = sys.stdin.read(1) 16 17 if not char: 18 break 19 20 uinput.cros_keys.type_chars(char) 21