ghostty_key_event_set_utf8 function

  1. @Native<Void Function(GhosttyKeyEvent, Pointer<Char>, Size)>(GhosttyKeyEvent, ffi.Pointer<ffi.Char>, ffi.Size)>()
void ghostty_key_event_set_utf8(
  1. GhosttyKeyEvent event,
  2. Pointer<Char> utf8,
  3. int len
)

Set the UTF-8 text generated by the key event.

The key event does NOT take ownership of the text pointer. The caller must ensure the string remains valid for the lifetime needed by the event.

@param event The key event handle, must not be NULL @param utf8 The UTF-8 text to set (or NULL for empty) @param len Length of the UTF-8 text in bytes

@ingroup key

Implementation

@ffi.Native<
  ffi.Void Function(GhosttyKeyEvent, ffi.Pointer<ffi.Char>, ffi.Size)
>()
external void ghostty_key_event_set_utf8(
  GhosttyKeyEvent event,
  ffi.Pointer<ffi.Char> utf8,
  int len,
);