(e)
| 1611 | } |
| 1612 | |
| 1613 | function handleListKeydown(e) { |
| 1614 | if (!listState.active) return |
| 1615 | var maxIdx = listState.items.length - 1 |
| 1616 | if (maxIdx < 0) return |
| 1617 | if (e.key === 'ArrowUp' || e.key === 'Up') { |
| 1618 | e.preventDefault() |
| 1619 | listState.ignoreMouseHover = true |
| 1620 | syncMouseHoverState() |
| 1621 | if (listState.selectedIndex > 0) { |
| 1622 | listState.selectedIndex-- |
| 1623 | } else { |
| 1624 | listState.selectedIndex = maxIdx |
| 1625 | } |
| 1626 | updateSelection() |
| 1627 | } else if (e.key === 'ArrowDown' || e.key === 'Down') { |
| 1628 | e.preventDefault() |
| 1629 | listState.ignoreMouseHover = true |
| 1630 | syncMouseHoverState() |
| 1631 | if (listState.selectedIndex < maxIdx) { |
| 1632 | listState.selectedIndex++ |
| 1633 | } else { |
| 1634 | listState.selectedIndex = 0 |
| 1635 | } |
| 1636 | updateSelection() |
| 1637 | } else if (e.key === 'Enter' || e.key === 'Return') { |
| 1638 | e.preventDefault() |
| 1639 | doSelect() |
| 1640 | } |
| 1641 | } |
| 1642 | |
| 1643 | electron.ipcRenderer.on('activate-list-mode', function (event, data) { |
| 1644 | var featureCode = data.featureCode |
nothing calls this directly
no test coverage detected