A cross-platform automation module for pressing, releasing, clicking keys and mouse, checking pixels, hotkeys, and more.
Project description
pressing
A Python automation module for simulating keyboard and pixel actions.
import pressing
from pressing import (
press,
release,
click,
run_macro,
pressed,
pixel,
pixel_color,
pixel_is,
write,
hotkey,
wait,
wait_key,
hold,
mouse_click,
mouse_move,
creator,
)
# Change typing speed
pressing.typewait = 0.05
# Display creator info
creator()
# Keyboard actions
press("shift")
click("a")
release("shift")
write("hello world")
hotkey("ctrl", "s")
# Run a macro list
run_macro(["a", "b", "c", "enter"])
# Wait for a key press
wait_key("space")
# Pixel checks
color = pixel_color(500, 300)
print("Pixel color:", color)
if pixel_is(500, 300, (255, 0, 0)):
print("That pixel is red.")
# Pixel + RGB tuple check
if pixel((500, 300), (255, 255, 255)):
print("Match!")
# Mouse actions
mouse_move(300, 400)
mouse_click("left")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pressing-0.2.2.tar.gz
(3.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pressing-0.2.2.tar.gz.
File metadata
- Download URL: pressing-0.2.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d36388be5055bdba54dc51f42827df5d210d7192fbc03f0a0212da43ae25c5f
|
|
| MD5 |
cef0b175957b8ce44350e9340acb6f44
|
|
| BLAKE2b-256 |
461d5db34d0d092a85a3a160d999c6e044429dd6cd48669f193dae5c252ecbaa
|
File details
Details for the file pressing-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pressing-0.2.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9646012215f983f78464f8f49d260b868635d57af1dd77bd712e412c340eba3c
|
|
| MD5 |
0edeffca62bc6ddc1f873e579c655ab2
|
|
| BLAKE2b-256 |
a1777d27a7a6b821c43a9173283a5a74cdb4f0cf1a98a5feb17a4c1811c26a2d
|