Interface DrawingKeyContext

interface DrawingKeyContext {
    editingText: boolean;
    hasSelection: boolean;
    hasTarget: boolean;
    placing?: boolean;
}

Properties

editingText: boolean

The user is typing (a text box is open). Every key is theirs.

hasSelection: boolean

At least one drawing is selected.

hasTarget: boolean

A drawing is under the pointer without being selected. Copy, cut, duplicate and delete act on it when nothing is selected; nudge does not, because moving something the user has not picked reads as a glitch.

placing?: boolean

A tool is armed. Escape, Enter and Backspace then belong to placement (cancel, finish, drop the last anchor) rather than to the selection.