https://github.com/ron-popov/python-input-library
A library that allows simulation of keyboard key presses for windows
https://github.com/ron-popov/python-input-library
python simulation
Last synced: 5 months ago
JSON representation
A library that allows simulation of keyboard key presses for windows
- Host: GitHub
- URL: https://github.com/ron-popov/python-input-library
- Owner: ron-popov
- License: mit
- Created: 2016-12-13T16:07:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-10T15:39:24.000Z (about 8 years ago)
- Last Synced: 2025-03-21T18:17:34.169Z (9 months ago)
- Topics: python, simulation
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Input Library
A library that allowes to simulate windows key presses.
The library consists of 3 sections, each one has different methods that do different things.
In this document i will list the methods that each one of the 3 files contains, their description,
the parameters you should pass them and also their return value.
# utils
### GetMonitorRes
Description : Returns the resolution of your monitor. Not tested for multiple monitor setups.
Parameters : None.
Return value : Tuple of length 2, first element represents width and second element represents height.
### Delay
Description : Delays the program for a certain amount of time.
Parameters : The number of seconds to delay the program. Doesn't have to be a whole number.
Return value : None.
---
# keyboard
The keyboard file contains methods that interact with the keyboard.
### HoldKey
Description : Starts pressing a certain key.
Parameters : A hexadecimal key code of the wanted key. A list of key hexadecimal key codes can be found [here](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx?f=255).
Return value : None.
### ReleaseKey
Description : Releases a certain key.
Parameters : A hexadecimal key code of the wanted key. A list of key hexadecimal key codes can be found [here](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx?f=255).
Return value : None.
---
# mouse
The mouse file contains method that interact with the mouse.
### GetMousePos
Description : Returns the position of the mouse.
Parameters : None.
Return value :
* The mouse x location.
* The mouse y location.
### SetMousePos
Description : Changes the mouse location
Parameters :
* The desired x location.
* The desired y location.
Return value: None.
### HoldRightButton
Description : Starts pressing the right mouse button
Parameters : None.
Return value : None.
### HoldLeftButton
Description : Starts pressing the left mouse button
Parameters : None.
Return value : None.
### ReleaseRightButton
Description : Stops pressing the right mouse button
Parameters : None.
Return value : None.
### ReleaseLeftButton
Description : Stops pressing the left mouse button
Parameters : None.
Return value : None.