The mouse
Every mouse action is a shortcut to keys: a click or a drag does what the keys it stands for do, and nothing the mouse does needs it.
At the table
| Mouse | Does |
|---|---|
| Click a cell | Puts the cursor on it |
| Click a header | The column cursor on its column |
| Double-click a cell | Enter on the row |
| Double-click a header | Sorts by its column, as [ ] do: ascending, then descending, then off. The header carries the direction |
| Double-click the gap right of a header | Fits the column to the rows on screen, as = does on the cursor’s column, which moves there; it never sorts |
| Drag a header onto another column | Moves the column there, as H L do; a rule on the header marks where it lands. Let go off the columns, or press a key, and nothing moves |
| Drag the gap right of a header | Sets the column’s width by hand, as < > do, from 4 to 240 cells; a column cut at the right side, by its last header cell |
| Right-click a cell | The cursor goes there and the cell’s menu opens |
| Wheel | ↑ ↓, three rows a notch |
| Shift+wheel, or a sideways wheel | ← →: the column cursor |
The cell’s menu
╭───────────────────────────────╮
│ ▎+ Filter to this value │
│ - Filter out this value │
│ F Value counts │
│ [ Sort ascending │
│ ] Sort descending │
│ y Copy │
│ Space Inspect row │
╰───────────────────────────────╯
Each line names its key, and running it presses that key on the cell.
| Key or mouse | Does |
|---|---|
| ↑ ↓ (k j) | Move between the lines |
| Enter, or a click on a line | Close the menu and press the line’s key |
| Esc, or a click elsewhere | Close the menu |
| Any other key | Close the menu, then act as typed |
In dialogs and sidebars
| Mouse | Does |
|---|---|
| Click a field | Focuses it and acts as Space: a checkbox flips, a choice steps, a picker opens, a button runs; a text field takes the cursor |
| Click a row of a list (a sort, a filter, a column in Sort & Filter) | Focuses it; a second click acts as Space |
| Right-click a choice | Steps it back, as ← does; on any other field, only focuses it |
| Click a line of an open picker | Chooses it (flips it, in a list of checkboxes) |
| Click a value in a list beside its field (export formats, compression) | Chooses it |
| Click a tab | Switches to it |
| Wheel over an open picker | Moves through its lines |
Click a key in a dialog’s footer (Esc Cancel) | Presses it; over help, an error or a question, only its footer’s keys take clicks |
| Click outside a dialog | Nothing |
In the footer
| Click | Does |
|---|---|
| A key | Presses it |
? keys | Opens the help |
| The filters and sort | s: the Sort & Filter sidebar |
query | :: the command line, on the query’s text |
While datui works
The mouse is never held for later. A click acts where its keys would act at once and is dropped where they would wait (Keys typed while datui works): a width drag acts at a busy table, as < > do, and a dropped header, a menu line or a click on a field is dropped.
Selecting text
Shift+drag selects text in most terminals. To leave the mouse to
the terminal, set mouse = false under [display], or run with
--mouse=false: Mouse and text selection.