A cross-platform automation module for pressing, releasing, and clicking keys, 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.1.tar.gz
(3.3 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.1.tar.gz.
File metadata
- Download URL: pressing-0.2.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37f3eb534a3dcffb5dfa728d6f5dcf991f8d3848c1e157fbc58c8b717c19fcb3
|
|
| MD5 |
1c1632d27768917ea4cc44688d6c64fc
|
|
| BLAKE2b-256 |
56c8bc567648794cec159017e1cdd14b6f6a3d20d93104fa679773e0eac3c1d4
|
File details
Details for the file pressing-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pressing-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.5 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 |
cc9370bc2ab8ab693f23b66cb46e868952803e6aeecdd52db8100cf99f2a8048
|
|
| MD5 |
ad91ba1c7292b31cbb0c13c22e29f4c9
|
|
| BLAKE2b-256 |
d9619cfa4ec8e7f764574c4ad0491aae69c30a8b858722677de6e27b80928c4c
|