aukey
aukey is a Python package designed to execute programs, files, and websites using customizable keyboard shortcuts.
Features
- Custom Shortcuts: Define custom keyboard shortcuts to execute programs, open files, or visit websites.
- Flexible Configuration: Configure shortcuts using a dictionary or JSON file.
- Multiple Action Types: Supports different action types, including executing programs, opening files, and launching URLs.
- Cross-Platform Compatibility: Works on both Windows and Linux systems.
- Installation
- You can install aukey directly from PyPI using pip:
Installation
You can install aukey directly from PyPI using pip:
pip install aukey
Usage
Basic Setup
- Import the package:
import aukey
- Create your shortcuts configuration:
You can define your shortcuts directly in the code or use an external JSON file. Example configuration:
shortcuts = [
{"name": "Open Notepad", "shortcut": "ctrlaltn", "type": "program", "path": "notepad.exe"},
{"name": "Open Google", "shortcut": "ctrlaltg", "type": "website", "path": "https://www.google.com"},
{"name": "Open a Document", "shortcut": "ctrlaltd", "type": "file", "path": "C:/path/to/document.docx"},
]
- Start listening for shortcuts:
aukey.start_listening(shortcuts)
Using a JSON Configuration File You can also load the configuration from a JSON file:
Create a JSON file with the following structure:
[
{"name": "Open Notepad", "shortcut": "ctrlaltn", "type": "program", "path": "notepad.exe"},
{"name": "Open Google", "shortcut": "ctrlaltg", "type": "website", "path": "https://www.google.com"},
{"name": "Open a Document", "shortcut": "ctrlaltd", "type": "file", "path": "C:/path/to/document.docx"}
]
Start listening for shortcuts:
aukey.start_listening("shortcuts.json")
Configuration Details
Each shortcut in the configuration must include the following keys:
- name: A descriptive name for the action.
- shortcut: The keyboard shortcut combination (e.g., ctrlaltg).
- type: The type of action (program, file, or website).
- path: The path to the program, file, or URL. Example Configuration
shortcuts = [
{"name": "Open Notepad", "shortcut": "ctrlaltn", "type": "program", "path": "notepad.exe"},
{"name": "Open Google", "shortcut": "ctrlaltg", "type": "website", "path": "https://www.google.com"},
{"name": "Open a Document", "shortcut": "ctrlaltd", "type": "file", "path": "C:/path/to/document.docx"},
]
Warnings
- Configuration Format: When adding a dictionary or JSON file as the configuration, ensure it follows this format:
[
{"name": "", "shortcut": "altff", "type": "", "path": ""},
{"name": "", "shortcut": "altee", "type": "", "path": ""}
]
-
Avoid Common Shortcuts: Do not use shortcuts that are already widely used by the system or applications, such as Ctrl+C, Ctrl+V, Ctrl+Z, etc. Using these might interfere with standard operations and cause unexpected behavior.
-
on linux you need to run sudo python
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue on GitHub.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for aukey 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aukey-0.1.2.tar.gz | 8.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aukey-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / aukey-0.1.2.tar.gz
| Download URL | aukey-0.1.2.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
388d886fc7291f0df906be0e4e05845b02cecb4f5bd6b62a3e422fb1ddfc39df
|
|
BLAKE2b-256 checksum How to use checksums |
c056f89bc638a6a1e861c8dc541fedec730c1bfc7167411938b77e87d3337385
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / aukey-0.1.2-py3-none-any.whl
| Download URL | aukey-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9da68f3717f66937a3e86927df5a0a30c4683dc23f2acd98f1bc70c78da7206
|
|
BLAKE2b-256 checksum How to use checksums |
99f7ee43495e9386f678f7d1a9d95ebb1dd25d01ebb431af323d52754c77a2b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for aukey 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.