Repository navigation
Desktop Surface and Files Input Audit
Source-only audit for issue #42,
against main 07e2686c. Findings are source findings;
proposals are proposed; nothing here is device-verified. Direction: file
interaction on a workstation target follows familiar desktop file-manager
conventions (Fork Product Direction).
Shared keyboard mapping: FileKeyboardCommand (used by both the Files tool and
the desktop surface). Files handles the full set in FileManagerActivity;
the desktop surface handles a subset in
DesktopWorkspaceController.handleKeyboardCommand, reached from
DesktopInputController.handleKeyEvent when the shell has focus and no panel is
visible.
| Interaction | Files tool | Desktop surface |
|---|---|---|
| Click selects; Ctrl+click toggles; Shift+click selects range | Present (onItemClick, selectRange, anchor path) |
Single selection only (selectedFile()) |
Double-click opens (single-click opt-in openFilesWithSingleClick) |
Present (ItemActivationPolicy using the system double-tap timeout) |
Not traced |
| Enter opens, F2 renames, Delete deletes, F5 refreshes, Esc clears selection | Present | Present (Open, Rename, Delete, Refresh, Clear) |
| Ctrl+C / X / V | Present | Present (single file) |
| Ctrl+A select all | Present | Mapped by FileKeyboardCommand but not handled |
| Ctrl+F find, Ctrl+L location, Ctrl+H hidden, Ctrl+N new window, Ctrl+Shift+N new folder | Present | Not handled |
| Backspace and Alt+Up go to the parent folder | Present (UP) |
n/a |
| Right-click, Menu key and long-press context menu | Present (background and item menus) | Present (DesktopContextMenuController, Menu key at screen centre) |
| Drag and drop | Present (startDragAndDrop, list drop target) |
Present (DesktopWorkspaceController drag listeners) |
| Delete semantics | Confirm dialog, then permanent delete (OPERATION_DELETE) |
Confirm dialog |
| # | Convention | Today | Class | Proposal | Confirming check |
|---|---|---|---|---|---|
| H1 | Multi-selection on the desktop surface: Ctrl/Shift+click, Ctrl+A | Single selection; SELECT_ALL falls to default: return false
|
Missing | Extend the desktop selection model to a set; reuse Files' anchor/range logic if it can be shared without copying; handle SELECT_ALL, multi-file copy/cut/delete |
Select several desktop items with keyboard and mouse; copy/paste moves all |
| H2 | Rubber-band (drag-rectangle) selection | No rubber-band or marquee handler found in either view | Missing | Add a primary-button gesture only on empty desktop grid space; use visible file-item bounds, compose with H1's replace/additive selection, and preserve parent context-menu, item drag and grid drop paths | Drag in either direction selects only intersecting visible items; menus, background taps, item drag/drop, and H1 copy/delete continue to work |
| H3 | Arrow-key movement of the selection | No handler in FileKeyboardCommand or the activities; whether Android focus traversal already moves selection was not traced |
Unverified | Reproduce on a device first; if absent, add Up/Down/Left/Right/Home/End selection moves with Shift extending | Arrow keys move the highlighted item; Enter opens it |
| H4 | Shift+Delete deletes permanently; Delete moves to a recycle bin | Delete is always permanent after a confirm; no trash exists in the app; Shift+Delete is unmapped (hasNoModifiers) |
Design decision | Decide whether a trash is wanted at all. If not, keep the confirm and map Shift+Delete to the same action without being a separate behavior | Decision recorded in the issue |
| H5 | Alt+Left / Alt+Right folder history | Only parent navigation (Backspace, Alt+Up) | Missing, low | Optional back/forward stack in the Files tool | History moves between visited folders |
| H6 | Middle-click opens in a new window or tab | No tertiary-button handling in the file views | Missing, low | Optional: open the folder in a new Files window | Middle-click on a folder opens a second window |
| H7 | Desktop surface shortcuts match Files | Ctrl+F, Ctrl+L, Ctrl+H and Ctrl+Shift+N are Files-only | Partial | Decide which make sense on a desktop with no location bar: at least Ctrl+Shift+N (new folder) | Chord creates a folder on the desktop |
- Android-owned behaviors (system drag shadows, IME text selection in text
fields) are not candidates; the Files key handler already stands aside when a
text field has focus (
getCurrentFocus() instanceof EditText). -
openFilesWithSingleClickis an existing user setting; its default was not recorded here, and the proposals do not change it.
Follow-ups: H1 multi-selection and H2 rubber-band selection have host/device acceptance checks. H3 arrow-key behavior requires device reproduction before any implementation. H4 is an open product decision; no trash or deletion semantic change is proposed until the owner decides.
PR #50 implements Ctrl/Shift multi-selection, Ctrl+A, selected-set copy/cut/delete and grouped file dragging. The seven-test selection model suite passed in CI in 0.81 seconds on the Ubuntu runner. Android build, unit checks and Windows smoke all passed. Physical mouse/keyboard behavior remains unverified until device validation is available. The change preserves the confirmation before permanent deletion and the existing per-item context menu actions.
PR #52 merged desktop-only
marquee selection over empty grid space. It draws a clipped overlay, hits only
visible file: item bounds, replaces selection on plain drag, and adds hits
when Ctrl or Shift is held at press. It restores the starting selection when
the gesture is cancelled. Ctrl-drag toggling, which matches common desktop file
manager behavior, is under review in PR #56.
Focused host checks passed. The Linux Android CI job passed in 7m34;
Windows smoke was still running at the last check. Physical pointer,
context-menu and drag/drop validation remain pending.
Keep marquee geometry separate from Android touch dispatch so rectangle
normalization, item intersection, viewport clipping, and modifier behavior can
be tested in the fast host selection suite. Feed it only rendered file: item
bounds; exclude widgets and non-file grid affordances. The marquee is drawn as
a non-interactive grid-local overlay and selection highlights update without
rebuilding grid children on every pointer move.
Start only on a primary-button drag from empty grid space. Item views own their drag gestures and the grid owns drop routing, while the wallpaper parent owns background taps and long-press context menus. Preserve those paths, as well as secondary-button menus. Define cancel, resize, reversed-direction, edge-touch, and partially clipped item behavior in host tests before wiring the gesture. The device acceptance check in issue #47 remains required for physical mouse and touch behavior.