Skip to main content

A tool to record and play back keyboard and mouse inputs.

Project description

Header

Description

This project enables the recording of keyboard and mouse inputs, which can be played back with looping functionality using the pynput library. It is designed to facilitate the automation of repetitive computer tasks efficiently, whatever they may be.

Installation

Install via PyPi

You can install this package directly from PyPi:

pip install record-and-play-pynput

Install from GitHub

Alternatively, you can clone the repository and install the dependencies manually:

  1. Clone or download this repository:
git clone https://github.com/george-jensen/record-and-play-pynput.git
  1. Navigate to the repository directory:
cd record-and-play-pynput
  1. Install the required dependencies using Poetry:
poetry install

Usage

Recording

  1. Run the record command, specifying the required name_of_recording argument. Example:
record-and-play record -n <name_of_recording>

All keyboard and mouse activity will be recorded.

  1. To end the recording:
  • Press the Escape key to stop the keyboard recording.
  • Hold the right mouse button for more than 2 seconds without moving the mouse, then release to stop the mouse recording.

Playback

  1. Run the play command, specifying the name_of_recording and the number_of_requests arguments. Example:
record-and-play play -n <name_of_recording> -p <number_of_repeats>
  1. To stop the playback early, trigger a KeyboardInterrupt by pressing Ctrl+C in the terminal window.

Notes

Scrolling functionality is supported, however it is not completely precise. So it is recommended to drag scrollbars when available. If you find you need to scroll to the top or bottom of pages then try and over-compensate when recording before continuing.

Compatablitity

At the moment this is Mac compatible - I haven't been able to find a Mac compatible tool that does a similar job and that is one of the reasons for this repository's creation.

It has recently been brought to my attention that there are issues with Windows compatability. I will try and address these soon.

Authors

George Jensen

Support!

If you found this tool useful please give this repo a star!

Please also feel free to create an issue to give feedback on any bugs, or ask for improvements! I'm always keen to keep things up to date and useful so any and all feedback is welcome!

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

record_and_play_pynput-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

record_and_play_pynput-0.1.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file record_and_play_pynput-0.1.0.tar.gz.

File metadata

  • Download URL: record_and_play_pynput-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.3 Darwin/23.5.0

File hashes

Hashes for record_and_play_pynput-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b00d6d87c234daa082e10a1f8a640908fb04d9f1176d4275d09ce3ee1110e50
MD5 ef6f2be1998ffe08943939353a9db6d8
BLAKE2b-256 7f205c03ac0f4509230fd1b07da9307ad2ad30b678a4acfb53f81dc48cdcf180

See more details on using hashes here.

File details

Details for the file record_and_play_pynput-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for record_and_play_pynput-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b6a0cbf6f41e8d9f5eb6c07324ff63c0f4c0bde71d6044a5b281d0d14ccad4c
MD5 af03b60cf9eabb9eb98f36fa11bbe8ed
BLAKE2b-256 f2615ce6355d385870e4a64b25b7747e73569ebf81eba5308a18ba0676b62167

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