Files
plantillas-proyectos/frontend/src/lib/config/shortcuts.ts
2026-02-04 09:17:09 -06:00

41 lines
1.1 KiB
TypeScript

/**
* Central Configuration for Keyboard Shortcuts
*
* Standards:
* - Alt + Key: Global Navigation (Route switching)
* - Ctrl + Key: Local Actions (Context specific)
*/
export const GLOBAL_NAV = {
// Goods
'g': '/dashboard/goods/parts',
'c': '/dashboard/goods/fixed-asset-classes',
//Pediments
'p': '/dashboard/pedimentos',
't': '/dashboard/reference_data/pedimento_codes',
'm': '/dashboard/reference_data/payment_methods',
'r': '/dashboard/reference_data/pedimento_regimens',
'e': '/dashboard/reference_data/customs_sections#',
'd': '/dashboard/reference_data/customs_sections',
// Invoices
'i': '/dashboard/invoices',
// Common Actions
'b': 'SEARCH_FOCUS', // Special case for generic focus
'h': '/', // Home
} as const;
export const STANDARD_ACTIONS = {
's': 'SAVE',
'n': 'NEW',
'e': 'EXPORT',
'd': 'DELETE',
'f': 'FILTER',
'Escape': 'CANCEL' // Special case
} as const;
export type GlobalNavKey = keyof typeof GLOBAL_NAV;
export type ActionKey = keyof typeof STANDARD_ACTIONS;