diff --git a/README.md b/README.md index 623ec41..0c9adf1 100644 --- a/README.md +++ b/README.md @@ -65,3 +65,7 @@ see [examples](examples) | Raspberry Pi 4 | Raspbian 12 | 6.1 | | Raspberry Pi Zero | Raspbian 5.10 | - | +## Gotachas + +--- +Absolute mouse used only for positining. use relative mouse for clicking etc. see examples. \ No newline at end of file diff --git a/examples/mouse_absolute_and_relative.py b/examples/mouse_absolute_and_relative.py new file mode 100644 index 0000000..ce66f85 --- /dev/null +++ b/examples/mouse_absolute_and_relative.py @@ -0,0 +1,12 @@ +from zero_hid import Mouse +from time import sleep + +# Absolute mouse used for positioning. relative mouse used for clicking. +with Mouse(absolute=False) as rel_mouse, Mouse(absolute=True) as abs_mouse: + abs_mouse.move(5000,5000) + sleep(1) + rel_mouse.right_click() + sleep(1) + abs_mouse.move(3000,3000) + sleep(1) + rel_mouse.left_click() \ No newline at end of file