Calls an action if a shortcut is pressed on a keyboard.
Characters 0-9 and A-Z are treated as Digit0-Digit9 and KeyA-KeyZ respectively.
useKeyboardShortcut({ // Ctrl+J on Windows, Command+J on macOS shortcut: ['Ctrl', 'J'], onAction() { // Handle shortcut action here }}); Copy
useKeyboardShortcut({ // Ctrl+J on Windows, Command+J on macOS shortcut: ['Ctrl', 'J'], onAction() { // Handle shortcut action here }});
Calls an action if a shortcut is pressed on a keyboard.
Characters 0-9 and A-Z are treated as Digit0-Digit9 and KeyA-KeyZ respectively.