;doc: ui: keys: updates, clarify period narrowing & shift arrow keys

This commit is contained in:
Simon Michael 2024-07-07 23:18:28 +01:00
parent 7020ed3023
commit 2f7eae0e35

View File

@ -102,31 +102,9 @@ The cursor keys navigate:
Emacs-style (`CTRL-p`/`CTRL-n`/`CTRL-f`/`CTRL-b`) Emacs-style (`CTRL-p`/`CTRL-n`/`CTRL-f`/`CTRL-b`)
and VI-style (`k`,`j`,`l`,`h`) and VI-style (`k`,`j`,`l`,`h`)
movement keys are also supported. movement keys are also supported.
A tip: movement speed is limited by your keyboard repeat rate,
to move faster you may want to adjust it.
(If you're on a mac, the karabiner app is one way to do that.)
With shift pressed, the cursor keys adjust the report period, (Tip: movement speed is limited by your keyboard repeat rate, to move faster you may want to adjust it.
limiting the transactions to be shown (by default, all are shown). On a mac, the Karabiner app is one way to do that.)
`SHIFT-DOWN/UP` steps downward and upward through these standard report period durations:
year, quarter, month, week, day.
Then, `SHIFT-LEFT/RIGHT` moves to the previous/next period.
`T` sets the report period to today.
With the `-w/--watch` option, when viewing a "current" period
(the current day, week, month, quarter, or year),
the period will move automatically to track the current date.
To set a non-standard period, you can use `/` and a `date:` query.
(Mac users: SHIFT-DOWN/UP keys do not work by default in Terminal, as of MacOS Monterey.
You can configure them as follows:
open Terminal,
press CMD-comma to open preferences,
click Profiles,
select your current terminal profile on the left,
click Keyboard on the right,
click + and add this for Shift-Down: `\033[1;2B`,
click + and add this for Shift-Up: `\033[1;2A`.
Press the Escape key to enter the `\033` part, you can't type it directly.)
`/` lets you set a general filter query limiting the data shown, `/` lets you set a general filter query limiting the data shown,
using the same [query terms](hledger.html#queries) as in hledger and hledger-web. using the same [query terms](hledger.html#queries) as in hledger and hledger-web.
@ -140,6 +118,26 @@ both ordinary transactions recorded in the journal, and periodic
transactions generated by rule. `F` toggles forecast mode, in which transactions generated by rule. `F` toggles forecast mode, in which
future/forecasted transactions are shown. future/forecasted transactions are shown.
Pressing `SHIFT-DOWN` narrows the report period, and pressing `SHIFT-UP` expands it again.
When narrowed, the current report period is displayed in the header line,
pressing `SHIFT-LEFT` or `SHIFT-RIGHT` moves to the previous or next period,
and pressing `T` moves to the period containing today.
If you are using `-w/--watch` and viewing a narrowed period containing today,
the view will follow any changes in system date (moving to the period containing the new date).
You can also specify a non-standard period with `/` and a `date:` query;
in this case, the period is not movable with the arrow keys.
(Tip: arrow keys with Shift do not work out of the box in all terminal software.
Eg in Apple's Terminal, the SHIFT-DOWN and SHIFT-UP keys must be configured as follows:
in Terminal's preferences, click Profiles,
select your current profile on the left,
click Keyboard on the right,
click + and add this for SHIFT-DOWN: `\033[1;2B`,
click + and add this for SHIFT-UP: `\033[1;2A`. <!-- Press the Escape key to enter the `\033` part, you can't type it directly.) -->
In other terminals (Windows Terminal ?) you might need to configure SHIFT-RIGHT and SHIFT-LEFT
to emit `\033[1;2C` and `\033[1;2D` respectively.)
`ESCAPE` resets the UI state and jumps back to the top screen, `ESCAPE` resets the UI state and jumps back to the top screen,
restoring the app's initial state at startup. restoring the app's initial state at startup.
Or, it cancels minibuffer data entry or the help dialog. Or, it cancels minibuffer data entry or the help dialog.