Let users press keys to create custom keyboard shortcuts
Just press any key combination and it gets saved automatically. Great for apps where users need their own custom shortcuts.
Powered by Mousetrap - A simple library for handling keyboard shortcuts in JavaScript.
You can install the package via Composer:
composer require aqjw/shortcutsIn order for component styles to be processed, you must add this package's views to your theme file (e.g., resources/css/filament/admin/theme.css):
@source '../../../../vendor/aqjw/shortcuts/resources/views';use Aqjw\Shortcuts\ShortcutInput;
ShortcutInput::make('shortcut')
->label('Keyboard Shortcut')
// The field stores data as an array:
['ctrl+c', 'ctrl+v']
['alt', 'f4']
['f12']| Method | Description | Default |
|---|---|---|
combinations(int) |
Maximum number of key combinations to record | 1 |
timeout(int) |
Timeout in milliseconds for recording | 700 |
instruction(string) |
Instruction text shown while recording | Localized text |
placeholder(string) |
Placeholder text when no shortcuts is set | Localized text |
The package supports 12 languages out of the box:
- 🇨🇳 Chinese (
zh) - 🇳🇱 Dutch (
nl) - 🇺🇸 English (
en) - 🇫🇷 French (
fr) - 🇩🇪 German (
de) - 🇮🇹 Italian (
it) - 🇯🇵 Japanese (
ja) - 🇰🇷 Korean (
ko) - 🇵🇹 Portuguese (
pt) - 🇷🇺 Russian (
ru) - 🇪🇸 Spanish (
es) - 🇺🇦 Ukrainian (
uk)
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.

