https://github.com/nklapste/keystroker
A Python Package that allows for direct keystokes to be sent to the currently active window. (currently supports windows only)
https://github.com/nklapste/keystroker
keyboard-emulation keystrokes python3 windows
Last synced: 2 months ago
JSON representation
A Python Package that allows for direct keystokes to be sent to the currently active window. (currently supports windows only)
- Host: GitHub
- URL: https://github.com/nklapste/keystroker
- Owner: nklapste
- License: mit
- Created: 2017-09-11T16:07:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-24T18:35:53.000Z (over 8 years ago)
- Last Synced: 2025-03-29T16:25:43.592Z (over 1 year ago)
- Topics: keyboard-emulation, keystrokes, python3, windows
- Language: Python
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keystroker
A Python 3 package for sending keystokes to active windows.
Currently, keystroker only supports windows builds (win 7 and higher).
## Requirements
Python 3.5+ (Lower Python 3 installs may work but are not supported)
## Installation
~~To install via pip use the following command:~~
~~`pip install keystroker`~~
Otherwise you can install keystroker through the source code by running the
following command within the extracted keystroker source directory:
`python3 setup.py install`
## Usage
Keystroker can be either used as an Python 3 package allowing for a api to send
keystrokes to a active window, or used as a terminal command to the same effect.
### Api Usage
A basic code example of using the keystroker api to send inputted keystrokes is shown below:
```
"""Simple test loop for sending user inputted keys"""
from keystroker.sendkeys import sendkeys
print("Testing SendKeys...")
while True:
line = input("Please input text to print: ")
sendkeys(line)
print("\n")
```
To get advanced help in using keystrokers api, documentation is present within
the source code.
### Command Usage
To get help in using keystroker's terminal command use the following command:
`keystroker -h`