Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DeskTop: Make arrow keys navigate icons spatially
Previously, arrow keys would iterate through icons in index order, with up/down behaving the same as left/right. While simple, this was surprising to users. Now, in icon views, Arrow keys will navigate the icons "spatially". That is, pressing the Right Arrow key will try to find an icon to the right of the current selection, pressing the Down Arrow key will try to find an icon below the current selection, and so on. If there is no such icon, selection remains unchanged. This works by searching for an icon in the indicated direction, which is fast if there is an icon. At 1MHz if there is no such icon then there can be a bit of a delay depending on the number of icons in the window. Also, if icons are in the regular grid then the behavior is very predictable. If you move icons so that they overlap, things are a bit weird... so don't do that. In list views, the Up/Down Arrow keys retain their current behavior, but the Left/Right Arrow keys are now ignored. This also corrects several edge cases: * In icon views, if nothing is selected in the active window (or desktop if none), the first icon becomes selected. * In list views, if nothing is selected in the active window, the first or last icon is selected depending on whether Down Arrow or Up Arrow was pressed. * If selection doesn't change (e.g. there's nothing to select in the active window, or there's nothing further to select), then selection doesn't change. Resolves #300
- Loading branch information