1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-24 15:59:42 +02:00

work on mouse click

This commit is contained in:
dbarzin 2022-07-14 14:00:37 +02:00
parent d9cc0b1ef2
commit 7d52bcdfd6
2 changed files with 4 additions and 1 deletions

View file

@ -2,9 +2,12 @@
def waitMouseClick():
mouse = open( "/dev/input/mice", "rb" )
down = False;
while True:
buf = mouse.read(3)
if ((buf[0] & 0x1)==1):
down = True
if (((buf[0] & 0x1)==0) and down):
break;
mouse.close()