in src/focus-zone.ts [217:231]
function getDirection(keyboardEvent: KeyboardEvent) {
const direction = KEY_TO_DIRECTION[keyboardEvent.key as keyof typeof KEY_TO_DIRECTION]
if (keyboardEvent.key === 'Tab' && keyboardEvent.shiftKey) {
return 'previous'
}
const isMac = isMacOS()
if ((isMac && keyboardEvent.metaKey) || (!isMac && keyboardEvent.ctrlKey)) {
if (keyboardEvent.key === 'ArrowLeft' || keyboardEvent.key === 'ArrowUp') {
return 'start'
} else if (keyboardEvent.key === 'ArrowRight' || keyboardEvent.key === 'ArrowDown') {
return 'end'
}
}
return direction
}