Calls onAction when the shortcut is pressed.
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 onAction when the shortcut is pressed.
Characters 0–9 and A–Z are treated as Digit0–Digit9 and KeyA–KeyZ respectively.