main f2d166b

hint_messages.go RawHistoryFolder

1package ports
2
3// HintKind is the kind of a clickable hint target.
4type HintKind uint8
5
6const (
7	// HintLink is a link or URL.
8	HintLink HintKind = iota
9	// HintButton is a button or control.
10	HintButton
11)
12
13// HintScanRequest asks the hint scanner to find clickable targets in the last
14// frame of Output. Core sends it and expects one HintScanResult echoing Seq.
15type HintScanRequest struct {
16	Seq    uint64 // core-chosen, echoed back
17	Output string
18	// Width and Height are the output buffer size in physical pixels
19	// (OutputInfo.Width/Height).
20	Width, Height int
21	Scale         float64 // screen scale
22	LinksOnly     bool
23	// Windows are the windows visible on Output, for sources that read a
24	// toolkit's accessibility tree. Core owns the slice per request.
25	Windows []HintWindow
26}
27
28// HintWindow is a window visible on the hint output.
29type HintWindow struct {
30	ID    WindowID
31	PID   int
32	AppID string
33	// Rect is the client area, logical output-local.
34	Rect    Rect
35	Focused bool
36}
37
38// HintTarget is a clickable region found in a frame.
39type HintTarget struct {
40	Rect Rect // logical, output-local
41	Kind HintKind
42	// Text is set for targets found by OCR (read from pixels, not from an
43	// accessibility tree).
44	Text bool
45	// Window is the source window of an accessibility target, 0 for OCR.
46	Window WindowID
47}
48
49// HintScanResult answers a HintScanRequest. Core owns Targets.
50type HintScanResult struct {
51	Seq     uint64
52	Output  string
53	Targets []HintTarget
54	Err     error
55}
56
57// HintLabel is a label drawn over a hint target.
58type HintLabel struct {
59	// Rect is the label box in logical output-local coordinates; X and Y are
60	// the target's top-left corner, which the renderer anchors the label
61	// outside of. W and H may be 0: the renderer sizes the box from Text.
62	Rect Rect
63	// Text is the full label, lowercase a–z.
64	Text string
65	// Typed is the number of leading characters already typed (drawn dimmed).
66	Typed int
67}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 25

Tags 10

↑↓ moveenter openesc close