diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/typ/reference.typ | 17 | ||||
| -rw-r--r-- | docs/typ/scripting.typ | 5 |
2 files changed, 20 insertions, 2 deletions
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index e60964cc..75b33151 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -28,6 +28,8 @@ screen the rendered screen as JSON @on listeners dial addresses @other-files sessions the pardes daemon's sessions and shells (pardes --ps) @other-files focus the serial of the pane with the keyboard; write one to move it @columns-and-tags +kbdin write runes: keys typed at the pane with the keyboard @other-files +mousein write m col row buttons: the mouse as it now is @other-files ctl settings and session builtins @root-ctl commands every builtin, one a line @other-files recent files opened lately: open|closed <path> @other-files @@ -906,6 +908,21 @@ at 200, ending in `…`. Control characters become spaces. = Other files <other-files> +- #file("/kbdin") (write only), rio's: each rune written is a key typed at + the pane with the keyboard, done before the write is answered, so a + script that writes keys then reads a file sees what they did. Control + runes are Ctrl and a letter, but for Plan 9's keys + (`keyboard.h`): `\n` or `\r` #key("Enter"), `\t` #key("Tab"), `\b` + Backspace, `0x7f` Delete, `0x1b` #key("Esc"), and the + arrows, Home, End, Page Up and Down, Insert and F1-F12 at their + private-use runes (`U+F00E` up, `U+F800` down, `U+F011` left, `U+F012` + right, `U+F00D` Home, `U+F018` End). No Alt, Shift or Super. +- #file("/mousein") (write only), devmouse's, in cells: a line `m col row + buttons` is the mouse as it now is, the buttons Plan 9's bits (1 left, 2 + middle, 4 right; 8 and 16 a wheel notch up and down). What changed since + the last line is released, moved or pressed there, in that order: `m 10 + 5 4` then `m 10 5 0` is a right click (a #word("Look")) at column 10, + row 5. Cells are #file("/screen")'s. - #file("/screen"): JSON `cols`, `rows`, `cursor`, `styles`, and row-major `cells` of `[grapheme, style_index]`; one frame per open. Compare a cell's style through `styles`, not the index. diff --git a/docs/typ/scripting.typ b/docs/typ/scripting.typ index d90f68ac..1116063d 100644 --- a/docs/typ/scripting.typ +++ b/docs/typ/scripting.typ @@ -9,8 +9,9 @@ files is an extension: ``` $ ls $m -README col commands ctl exec focus index layout listeners log -look os pager pane recent screen sessions status tag tagexec +README col commands ctl exec focus index kbdin layout listeners +log look mousein os pager pane recent screen sessions status tag +tagexec $ cat $m/index 1 term 0 /home/me/src 1 2 text 0 /home/me/src/+New 1 |
