mirror of
https://github.com/rfc2822/GfxTablet
synced 2025-10-04 18:19:16 +02:00
handle exit
This commit is contained in:
parent
d77d486dd8
commit
a8444865ce
1 changed files with 17 additions and 14 deletions
|
@ -96,6 +96,7 @@ def main():
|
||||||
|
|
||||||
movement_manager = PositionManager("Galaxy Note 4")
|
movement_manager = PositionManager("Galaxy Note 4")
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
line = p.stdout.readline().decode("utf-8")
|
line = p.stdout.readline().decode("utf-8")
|
||||||
if not line:
|
if not line:
|
||||||
break
|
break
|
||||||
|
@ -112,6 +113,8 @@ def main():
|
||||||
pyautogui.mouseUp(button="left")
|
pyautogui.mouseUp(button="left")
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
quit()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue