A package for executing programs, files, websites by using shortcuts.
Project description
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.
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.
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
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 aukey-0.1.1.tar.gz.
File metadata
- Download URL: aukey-0.1.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcd3110487bd5296ad9480cf1415716aade46601069867b601785839afec7d17
|
|
| MD5 |
01e6c114a959f1ee9874320327e48b55
|
|
| BLAKE2b-256 |
8d34282a2e91171bf71cddca2b78ee6c642fe56be9169d1e19ecfafa01f04915
|
File details
Details for the file aukey-0.1.1-py3-none-any.whl.
File metadata
- Download URL: aukey-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38c8827eb390672d99c06e844bf6a913770bf14fc06bd1a99c131fb872319d42
|
|
| MD5 |
1985653ec992933f49c8912a3209226c
|
|
| BLAKE2b-256 |
dacd78951597b497b5f163706c50b5cf4703e1c2255cba4fa321ff1ac8e0d1e3
|