Skip to main content

No project description provided

Project description

Dokkey

Dokkey is a Python package designed to detect keypresses on Windows. It captures keyboard input and returns the ASCII code of the key pressed. This package has been tested on Windows 11.


Features

  • Detects keypresses on Windows.
  • Returns the ASCII code of the key pressed.
  • Lightweight and easy to integrate into your projects.

Requirements

  • Python 3.7 or higher
  • Windows OS (Tested on Windows 11)

Installation

Install the package using pip:

pip install dokkey

Usage

Here is an example of how to use Dokkey:

import dokkey

# Define a Python callback
def on_key(vk_code):
    print(f"Key pressed: {vk_code}")

# Install the hook
dokkey.install_hook(on_key)

try:
    print("Listening for key presses. Press Ctrl+C to stop.")
    dokkey.run_message_loop()
except KeyboardInterrupt:
    dokkey.uninstall_hook()
    print("Stopped.")

Output Example

Listening for key presses. Press Ctrl+C to stop.
Key pressed: 65  # (A key)
Key pressed: 98  # (b key)

How It Works

Dokkey leverages Windows APIs to capture global keyboard events and converts the input to ASCII codes. It ensures minimal interference with other running applications.

Limitations

This package works only on Windows. It may require administrator privileges for certain use cases.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you have suggestions or improvements.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Developed by Sekiraw

Acknowledgements

Thanks to the Python and Windows development communities for providing tools and resources to make this project possible.

This styling ensures clarity, proper sectioning, and good readability. Let me know if you`d like any further adjustments!

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

dokkey-1.0.5.tar.gz (6.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dokkey-1.0.5-cp313-cp313-win_amd64.whl (11.8 kB view details)

Uploaded CPython 3.13Windows x86-64

dokkey-1.0.5-cp312-cp312-win_amd64.whl (11.8 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file dokkey-1.0.5.tar.gz.

File metadata

  • Download URL: dokkey-1.0.5.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for dokkey-1.0.5.tar.gz
Algorithm Hash digest
SHA256 86227a52a6f0686721324b66774d2baf789dae99dda6cd3af44ea181af9dc457
MD5 c5f785165fdb1d090e796d61d258c915
BLAKE2b-256 c6ac71f83051be5955545ddf762613e65771306996c5e9ede7e48d21b5ca5c70

See more details on using hashes here.

File details

Details for the file dokkey-1.0.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dokkey-1.0.5-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for dokkey-1.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 15cd4ada3fe93a716d3c723a87db388891e5eb831419c8dc4037fd5e8c027298
MD5 9d2f1363ad191483b7bf5f1cde816b3f
BLAKE2b-256 d604fcbb1701a3916f50c37b4eeb4214f4af5f7e5bc6c0f8fb9736e466093227

See more details on using hashes here.

File details

Details for the file dokkey-1.0.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dokkey-1.0.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for dokkey-1.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dfc9bc705e59e72b5e339b99a1bdf9cbe5d84638d269be325cd6c5a09ff57958
MD5 e913b7cea74e6fe5f487540973537bbb
BLAKE2b-256 04e928a5fdcc709e47157628497855808339b8348a84278b39ddb909de652a71

See more details on using hashes here.

Supported by

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