No project description provided
Project description
Python-Input
Simple mouse and keyboard input for python.
Usage
from python_input import Input, MouseButton
inp = Input()
while(not inp.get_key("q")):
#Keyboard
if inp.get_key("space"):
print("Space pressed!")
elif(inp.get_key_down("a")):
print("A down")
elif(inp.get_key_up("d")):
print("D up")
#Mouse
if(inp.get_mouse(MouseButton.left)):
print("Left pressed")
elif(inp.get_mouse_down(MouseButton.middle)):
print("Middle down")
elif(inp.get_mouse_up(MouseButton.right)):
print("Right up")
Keys
Keys are the simple string represtnation of the keys.
To list all avaiable keyboard key strings use print_available_keys
from python_input import Input, MouseButton
inp = Input()
inp.print_available_keys()
Installing from source
poetry init
poetry build
pip install dist/python_input-<VERSION>.tar.gz
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
python_input-0.1.3.tar.gz
(2.1 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 python_input-0.1.3.tar.gz.
File metadata
- Download URL: python_input-0.1.3.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.8.10 Linux/5.15.0-86-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67bec253c495c4c748444ce45f78993dfd07d1fa46ea5a0052d63da3663106c
|
|
| MD5 |
fcd31d09c8627a5053bd22a289a03ff5
|
|
| BLAKE2b-256 |
f300951160358ab00a7e428b223f5a704cb1fcab673ddaca6d2a08feff6971a7
|
File details
Details for the file python_input-0.1.3-py3-none-any.whl.
File metadata
- Download URL: python_input-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.8.10 Linux/5.15.0-86-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65effb5d5e78c370b7a58ac27cce9cd3ebbb996706de93b57f209444ca505670
|
|
| MD5 |
27282fd311fe4cc20e56edd8c4b514ac
|
|
| BLAKE2b-256 |
60faa05aa0dc1d3bedf951efb3a5a3cfd2b3676cfb37c87591d00a39ff36f219
|