Skip to main content

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

This version

0.10

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)

Uploaded Source

Built Distribution

pykeycontrol-0.10-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for pykeycontrol-0.10.tar.gz
Algorithm Hash digest
SHA256 a326054b8ec61603406c7e9c04ebc06a1afbc1889ae4fd6339f6903857ba752c
MD5 e3fa450819aac76fdb62a94621b5c6f2
BLAKE2b-256 6740234c8891c417b4ee67baede6d02be0911c60030dd51e480cf1470594b5c7

See more details on using hashes here.

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

Hashes for pykeycontrol-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d187ff833f86ded455d65529db61c47350d4f83e673ca247a78a138941dbd026
MD5 be4ef26890c86b8936ea6150eae6ba35
BLAKE2b-256 87d258bd3f087c34205468cab73f39d139295b960269e224b988c043f34edc39

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page