Browse Source

new io keys

main
gsd 6 months ago
parent
commit
97d8afef76
  1. 21
      pipboyIO/next/serialAX.py

21
pipboyIO/next/serialAX.py

@ -64,9 +64,25 @@ class AD:
print(self.d)
subprocess.Popen(self.d)
class QE:
def __init__(self):
self.pin = 103
self.e = "xdotool key e".split()
self.q = "xdotool key q".split()
def __call__(self, data):
if data[2] == MOVEMENT.LEFT:
if DEBUGIO:
print(self.q)
subprocess.Popen(self.q)
if data[2] == MOVEMENT.RIGHT:
if DEBUGIO:
print(self.e)
subprocess.Popen(self.e)
class WS:
def __init__(self):
self.pin = 101
self.pin = 102
self.w = "xdotool key w".split()
self.s = "xdotool key s".split()
@ -109,7 +125,8 @@ class Listener(asyncio.Protocol):
101: AD(),
104: MODE(),
102: WS(),
1001: ENTER()
1001: ENTER(),
103: QE()
}
def __init__(self):

Loading…
Cancel
Save