Simplify arrow function syntax and remove unnecessary whitespace across composable utilities

This commit is contained in:
2026-01-28 19:50:05 +00:00
parent 07c4379d81
commit 1ad9389318
4 changed files with 11 additions and 11 deletions

View File

@@ -9,7 +9,7 @@ import { onMounted, onUnmounted } from 'vue';
* Register keyboard shortcuts
* @param {Object} shortcuts - Map of key combinations to handlers
* @returns {Object} Control functions
*
*
* Example shortcuts object:
* {
* 'ctrl+f': () => focusSearch(),
@@ -18,7 +18,7 @@ import { onMounted, onUnmounted } from 'vue';
* }
*/
export function useKeyboardShortcuts(shortcuts = {}) {
const handleKeyDown = (event) => {
const handleKeyDown = event => {
const key = event.key.toLowerCase();
const ctrl = event.ctrlKey || event.metaKey; // Support both Ctrl and Cmd
const shift = event.shiftKey;
@@ -36,7 +36,7 @@ export function useKeyboardShortcuts(shortcuts = {}) {
// Try to find and execute handler
const handler = shortcuts[combination] || shortcuts[simpleKey];
if (handler) {
event.preventDefault();
handler(event);