Welcome to mirror list, hosted at ThFree Co, Russian Federation.

keyboard.py « tests - github.com/ynsta/steamcontroller.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 815fc12456e48d1e2af2374bb15087d9d3ef9deb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

import time
from steamcontroller.uinput import Keys, Keyboard

k = Keyboard()

press = True
try:
    while True:
        input()

        if press:
            k.pressEvent([Keys.KEY_Q])
        else:
            k.releaseEvent()

        press = not press

except KeyboardInterrupt:
    pass