Start/stop functions/methods with hotkeys!
Project description
Start/stop functions/methods with hotkeys!
$pip install pykeycontrol
from pykeycontrol import StopStart
from time import sleep
def testest2():
startstop = StopStart(hotkey_enable="ctrl+alt+p",
hotkey_disable="ctrl+alt+o",
hotkey_hc_exit="ctrl+alt+e", )
startstop.reset_all_hotkeys().add_hotkeys()
startstop.stop = False
while startstop.stop is False:
print('baba')
sleep(1)
class NewClass:
def __init__(self):
self.startstop = StopStart(hotkey_enable="ctrl+alt+p",
hotkey_disable="ctrl+alt+o",
hotkey_hc_exit="ctrl+alt+e", )
self.startstop.add_hotkeys()
self.startstop.stop = False
def testest(self):
while self.startstop.stop is False:
print('baba')
sleep(1)
testest2()
baba
baba
baba
baba
baba
HARDCORE EXIT! FTW!
Process finished with exit code 1 #"ctrl+alt+e"
nac=NewClass()
nac.testest()
baba
baba
baba
baba
baba
baba
baba
baba
Disabled! #"ctrl+alt+o"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pykeycontrol-0.10.tar.gz
(3.3 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 pykeycontrol-0.10.tar.gz.
File metadata
- Download URL: pykeycontrol-0.10.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a326054b8ec61603406c7e9c04ebc06a1afbc1889ae4fd6339f6903857ba752c
|
|
| MD5 |
e3fa450819aac76fdb62a94621b5c6f2
|
|
| BLAKE2b-256 |
6740234c8891c417b4ee67baede6d02be0911c60030dd51e480cf1470594b5c7
|
File details
Details for the file pykeycontrol-0.10-py3-none-any.whl.
File metadata
- Download URL: pykeycontrol-0.10-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d187ff833f86ded455d65529db61c47350d4f83e673ca247a78a138941dbd026
|
|
| MD5 |
be4ef26890c86b8936ea6150eae6ba35
|
|
| BLAKE2b-256 |
87d258bd3f087c34205468cab73f39d139295b960269e224b988c043f34edc39
|