Files
taskpile/frontend/node_modules/@testing-library/user-event/dist/esm/keyboard/keyMap.js
Alvis f1d51b8cc8 Add side panels, task selection, graph animation, and project docs
- Foldable left panel (user profile) and right panel (task details)
- Clicking a task in the list or graph node selects it and shows details
- Both views (task list + graph) always mounted via absolute inset-0 for
  correct canvas dimensions; tabs toggle visibility with opacity
- Graph node selection animation: other nodes repel outward (charge -600),
  then selected node smoothly slides to center (500ms cubic ease-out),
  then charge restores to -120 and graph stabilizes
- Graph re-fits on tab switch and panel resize via ResizeObserver
- Fix UUID string IDs throughout (backend returns UUIDs, not integers)
- Add TaskDetailPanel, UserPanel components
- Add CLAUDE.md project documentation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 11:23:06 +00:00

177 lines
3.3 KiB
JavaScript

import { DOM_KEY_LOCATION } from '../system/keyboard.js';
/**
* Mapping for a default US-104-QWERTY keyboard
*/ const defaultKeyMap = [
// alphanumeric block - writing system
...'0123456789'.split('').map((c)=>({
code: `Digit${c}`,
key: c
})),
...')!@#$%^&*('.split('').map((c, i)=>({
code: `Digit${i}`,
key: c,
shiftKey: true
})),
...'abcdefghijklmnopqrstuvwxyz'.split('').map((c)=>({
code: `Key${c.toUpperCase()}`,
key: c
})),
...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('').map((c)=>({
code: `Key${c}`,
key: c,
shiftKey: true
})),
{
code: 'BracketLeft',
key: '['
},
{
code: 'BracketLeft',
key: '{',
shiftKey: true
},
{
code: 'BracketRight',
key: ']'
},
{
code: 'BracketRight',
key: '}',
shiftKey: true
},
// alphanumeric block - functional
{
code: 'Space',
key: ' '
},
{
code: 'AltLeft',
key: 'Alt',
location: DOM_KEY_LOCATION.LEFT
},
{
code: 'AltRight',
key: 'Alt',
location: DOM_KEY_LOCATION.RIGHT
},
{
code: 'ShiftLeft',
key: 'Shift',
location: DOM_KEY_LOCATION.LEFT
},
{
code: 'ShiftRight',
key: 'Shift',
location: DOM_KEY_LOCATION.RIGHT
},
{
code: 'ControlLeft',
key: 'Control',
location: DOM_KEY_LOCATION.LEFT
},
{
code: 'ControlRight',
key: 'Control',
location: DOM_KEY_LOCATION.RIGHT
},
{
code: 'MetaLeft',
key: 'Meta',
location: DOM_KEY_LOCATION.LEFT
},
{
code: 'MetaRight',
key: 'Meta',
location: DOM_KEY_LOCATION.RIGHT
},
{
code: 'OSLeft',
key: 'OS',
location: DOM_KEY_LOCATION.LEFT
},
{
code: 'OSRight',
key: 'OS',
location: DOM_KEY_LOCATION.RIGHT
},
{
code: 'ContextMenu',
key: 'ContextMenu'
},
{
code: 'Tab',
key: 'Tab'
},
{
code: 'CapsLock',
key: 'CapsLock'
},
{
code: 'Backspace',
key: 'Backspace'
},
{
code: 'Enter',
key: 'Enter'
},
// function
{
code: 'Escape',
key: 'Escape'
},
// arrows
{
code: 'ArrowUp',
key: 'ArrowUp'
},
{
code: 'ArrowDown',
key: 'ArrowDown'
},
{
code: 'ArrowLeft',
key: 'ArrowLeft'
},
{
code: 'ArrowRight',
key: 'ArrowRight'
},
// control pad
{
code: 'Home',
key: 'Home'
},
{
code: 'End',
key: 'End'
},
{
code: 'Delete',
key: 'Delete'
},
{
code: 'PageUp',
key: 'PageUp'
},
{
code: 'PageDown',
key: 'PageDown'
},
// Special keys that are not part of a default US-layout but included for specific behavior
{
code: 'Fn',
key: 'Fn'
},
{
code: 'Symbol',
key: 'Symbol'
},
{
code: 'AltRight',
key: 'AltGraph'
}
];
export { defaultKeyMap };