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.1.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.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: record_and_play_pynput-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e073c26a6a5d7a9a00564f74658a680771e7b45f93894ed9744e08a61876e751
MD5 af175af75ecf50589a6d31f282aa82e3
BLAKE2b-256 e78aa98b4c08e52c989d776af58f377c9ca9d0be8d511bee42e4d81ee55c1701

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for record_and_play_pynput-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 16174a3b6e29b58087de0973eb2c8eecd9009555f73116c9dd1bb925ad6342dd
MD5 b8f0151cfa730b6af588ef5fbeb88925
BLAKE2b-256 a8f968026e1ebf6935dafadbe7d377782d30b4a23526ea7eb306f9a165a9a8b9

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