UI module

handle_key

procedure · 1 overloadsince 0.31.0Source

Apply one KEY or TEXT input event to edit. style is the text style the lines are drawn in (vertical movement measures with it); page_lines is how many lines a page is.

handle_key :: (
    ui: *UI_State,
    edit: *Text_Edit,
    event: Input_Event,
    style: Text_Style,
    options: Editor_Options,
    page_lines: int
) -> Key_Result

Apply one KEY or TEXT input event to edit. style is the text style the lines are drawn in (vertical movement measures with it); page_lines is how many lines a page is.

Parameters

ui: *UI_State
the UI, used for measuring and the clipboard.
edit: *Text_Edit
the text being edited.
event: Input_Event
the KEY or TEXT event.
style: Text_Style
the text style the lines are drawn in, used to measure vertical moves.
options: Editor_Options
read-only mode and the tab width.
page_lines: int
how many lines Page Up and Page Down move.

Returns

See also