Esc

send_composition

procedureextensionexperimentalsince 0.36.1Source
  • macOS: send_composition works on macOS
  • Linux: send_composition works on Linux
  • Windows: send_composition works on Windows
  • Wasm: send_composition is not available on Wasm

Queue marked UTF-8 text. Updates do not change the document; commit replaces the selection once. cancel discards the preedit. The queue copies text, so the caller may release it immediately.

Signature

send_composition :: (
    ui: *UI_State,
    text: string,
    commit: bool = false,
    cancel: bool = false,
    cursor: int = -1
)
Example
ui := headless();
defer free_ui(*ui);
send_composition(*ui, "かな");
send_composition(*ui, "仮名", commit = true);

See also