Update cpx-mouse-buttons.py
@@ -6,11 +6,12 @@ m = Mouse()
while True:
if cpx.button_a:
m.press(Mouse.LEFT_BUTTON)
- while cpx.button_a:
+ while cpx.button_a: # Wait for button A to be released
pass
m.release(Mouse.LEFT_BUTTON)
+
if cpx.button_b:
m.press(Mouse.RIGHT_BUTTON)
- while cpx.button_b:
+ while cpx.button_b: # Wait for button B to be released
pass
m.release(Mouse.RIGHT_BUTTON)
