https://github.com/zerosonesfun/shorty
A WordPress plugin that lets you effortlessly add keyboard shortcuts.
https://github.com/zerosonesfun/shorty
javascript keyboard-shortcuts php shortcuts wordpress wordpress-plugin
Last synced: 2 months ago
JSON representation
A WordPress plugin that lets you effortlessly add keyboard shortcuts.
- Host: GitHub
- URL: https://github.com/zerosonesfun/shorty
- Owner: zerosonesfun
- License: gpl-2.0
- Created: 2024-12-29T21:26:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-17T20:03:44.000Z (6 months ago)
- Last Synced: 2025-12-21T08:05:12.010Z (6 months ago)
- Topics: javascript, keyboard-shortcuts, php, shortcuts, wordpress, wordpress-plugin
- Language: JavaScript
- Homepage: https://wilcosky.com/shorty
- Size: 169 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Shorty - WordPress Keyboard Shortcuts Plugin
A powerful WordPress plugin that allows site administrators to create custom keyboard shortcuts for quick navigation to any URL on their website.



## ๐ Features
### โจ Core Functionality
- **Custom Keyboard Shortcuts**: Create unlimited keyboard shortcuts for any URL
- **Configurable Modifier Keys**: Choose from 7 different modifier key combinations:
- Ctrl + Shift (default)
- Alt + Shift
- Ctrl + Alt
- Ctrl + Meta (Cmd on Mac)
- Alt + Meta (Cmd on Mac)
- Shift + Meta (Cmd on Mac)
- Ctrl + Shift + Alt
### ๐ฏ User Experience
- **Shortcuts Modal**: Press `Ctrl+/` (or `Cmd+/` on Mac) to see all available shortcuts
- **Custom Modal Text**: Add your own instructions, branding, or helpful information
- **Frontend & Backend**: Works on both admin and public-facing pages
- **Responsive Design**: Clean, modern interface with sharp corners
### ๐ Internationalization
- **Multi-language Support**: Fully translated into:
- Spanish (es_ES)
- French (fr_FR)
- Chinese Simplified (zh_CN)
- Japanese (ja)
- **Translation Ready**: Easy to add new languages
### ๐ง Technical Features
- **WordPress Standards**: Follows WordPress coding standards and best practices
- **Clean Uninstall**: Properly removes all data when uninstalled
- **Performance Optimized**: Lightweight and fast
- **Security**: Proper sanitization and escaping
## ๐ฆ Installation
### Method 1: Manual Installation
1. Download the plugin files
2. Upload the `shorty` folder to `/wp-content/plugins/`
3. Activate the plugin through the 'Plugins' menu in WordPress
4. Go to **Settings > Shorty** to configure your shortcuts
### Method 2: WordPress Admin
1. Go to **Plugins > Add New**
2. Click **Upload Plugin**
3. Choose the plugin zip file
4. Click **Install Now** and then **Activate**
## โ๏ธ Configuration
### Setting Up Shortcuts
1. Navigate to **Settings > Shorty**
2. Choose your preferred modifier key combination
3. Add custom text for the shortcuts modal (optional)
4. Add keyboard keys and their corresponding URLs
5. Click **Save Changes**
### Example Shortcuts
| Key | URL | Description |
|-----|-----|-------------|
| `A` | `/about` | Navigate to About page |
| `C` | `/contact` | Navigate to Contact page |
| `B` | `/blog` | Navigate to Blog page |
| `H` | `/` | Navigate to Home page |
### Using Shortcuts
- **Default**: Press `Ctrl + Shift + [Key]` to navigate
- **Custom**: Use your chosen modifier combination + [Key]
- **Help**: Press `Ctrl+/` (or `Cmd+/` on Mac) to see all shortcuts
## ๐ Internationalization
The plugin is fully translated and ready for international use:
### Available Languages
- **Spanish (es_ES)** - Espaรฑol
- **French (fr_FR)** - Franรงais
- **Chinese Simplified (zh_CN)** - ็ฎไฝไธญๆ
- **Japanese (ja)** - ๆฅๆฌ่ช
### Adding New Languages
1. Copy `languages/shorty.pot` to `languages/shorty-[language_code].po`
2. Translate the strings using a tool like Poedit
3. Compile to MO format: `msgfmt -o shorty-[language_code].mo shorty-[language_code].po`
4. The translation will be automatically available
## ๐ ๏ธ Development
### File Structure
```
shorty/
โโโ includes/
โ โโโ admin.php # Admin settings page
โ โโโ enqueue.php # Script and style enqueuing
โ โโโ shortcuts.php # Shortcut handling functions
โ โโโ js/
โ โโโ shorty.js # Frontend JavaScript
โโโ languages/ # Translation files
โโโ shorty.php # Main plugin file
โโโ uninstall.php # Cleanup on uninstall
โโโ README.md # This file
```
### Hooks and Filters
The plugin uses WordPress standard hooks and follows best practices for extensibility.
### Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request
## ๐ Requirements
- **WordPress**: 5.0 or higher
- **PHP**: 7.4 or higher
- **Browser**: Modern browser with JavaScript enabled
## ๐ Security
- All user inputs are properly sanitized
- Output is properly escaped
- Follows WordPress security best practices
- No direct file access allowed
## ๐ License
This plugin is licensed under the GPL v2 or later.
```
Copyright (C) 2024 Billy Wilcosky
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
```
## ๐จโ๐ป Author
**Billy Wilcosky**
- Website: [https://wilcosky.com](https://wilcosky.com)
- Email: billy@wilcosky.com
## ๐ค Support
- **Documentation**: Check the plugin settings page for help
- **Issues**: Report bugs or feature requests on GitHub
- **Translations**: Contribute translations to make the plugin available in more languages
## ๐ Changelog
### Version 1.1.1
- Compatibility checks with WordPress 6.9
### Version 1.0
- Initial release
- Custom keyboard shortcuts functionality
- Configurable modifier keys
- Shortcuts modal with `Ctrl+/` trigger
- Custom modal text support
- Multi-language support (Spanish, French, Chinese, Japanese)
- WordPress standards compliance
- Clean uninstall functionality
---
**Made with โค๏ธ for the WordPress community**