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.2.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.2.tar.gz.
File metadata
- Download URL: python_input-0.1.2.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 |
db6b3db37c0b4786992b9703726ac2c51fdd501a33e8832590c979c74abe1bc2
|
|
| MD5 |
b52673729be5af5267498a3b775f1de0
|
|
| BLAKE2b-256 |
479f5c27fa4e8e54bc07f1f93c4ab56e181b30ee3b8bce373d6f00c702ae7981
|
File details
Details for the file python_input-0.1.2-py3-none-any.whl.
File metadata
- Download URL: python_input-0.1.2-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 |
fa5a2ea0d4c666cd4b99e7c32aba2b7aac37653173e05ad42f3db52414710646
|
|
| MD5 |
b5d67c2c95bb8d7022a62f24e7e4fdff
|
|
| BLAKE2b-256 |
5e4e22df698a46e4cd101ae346b7072e491de80a6daa8613bee6178a72e2b29d
|