Skip to main content

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.

Full Example (uses every import)

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 raw 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


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.1.7.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pressing-0.1.7-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pressing-0.1.7.tar.gz.

File metadata

  • Download URL: pressing-0.1.7.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pressing-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f1094f2a7ff33d45742ebf9fb1ce6067925602910d3c320e014528a7e7cd5f48
MD5 3425a6f098910ab61e13f9f585bfd713
BLAKE2b-256 a485763f79d75b9122acdd517efbe09477f3bdeb073e2c2696157b895a092b68

See more details on using hashes here.

File details

Details for the file pressing-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: pressing-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pressing-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b37d8c1bbb248e5efac35c66a35a24c06e0d4bce08e445161b98fa2c3e89c867
MD5 8604a0553b47561ff7c9a978ec83a2ea
BLAKE2b-256 db20c3cb24c64d47a09d1b211032b400a2cdb172fa2ed62adb2ad85681b6653e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page