Scoop API

scoop:scoop.window:0.1.0

src/text/commands.scoop

Selected production source · src/text/commands.scoop

1package scoop.window
3/** Logical and visual motions are distinct, especially in bidirectional text. */
4public enum TextMovement {
5 Backward, Forward, Left, Right, Up, Down,
6 WordBackward, WordForward, WordLeft, WordRight,
7 LineStart, LineEnd, LineLeft, LineRight,
8 ParagraphStart, ParagraphEnd, DocumentStart, DocumentEnd, PageUp, PageDown
9}
11/** Deletions use graphemes, Unicode words, or the named line/paragraph boundary. */
12public enum TextDeletion {
13 Backward, Forward, WordBackward, WordForward, LineStart, LineEnd, ParagraphStart, ParagraphEnd
16/** Native editing interpretation carried by the same routed keyboard event. */
17public enum TextEditCommand {
18 Move(val movement: TextMovement, val extendSelection: Boolean),
19 Delete(TextDeletion), DeleteSelection, Copy, Cut, Paste, SelectAll, Undo, Redo,
20 InsertNewline, InsertTab, InsertBacktab, Cancel