MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / await_key

Function await_key

cpython/kbdFeatherWing/factory_test.py:89–101  ·  view source on GitHub ↗
(kbd, key, name='')

Source from the content-addressed store, hash-verified

87
88# Keyboard test helper
89def await_key(kbd, key, name=''):
90 if name == '':
91 name = key
92
93 print('Press %s' % name)
94
95 while kbd.key_count < 2:
96 pass
97
98 keys = kbd.keys
99 res = (keys[0] == (1, key) and keys[1] == (3, key))
100 if not res:
101 raise Exception('Expected %s but got %s' % (name, keys))
102
103# Keyboard
104try:

Callers 1

factory_test.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected