pub unsafe extern "C" fn ghostty_key_encoder_setopt(
encoder: GhosttyKeyEncoder_ptr,
option: GhosttyKeyEncoderOption,
value: *const c_void,
)Expand description
Set an option on the key encoder.
Configures the behavior of the key encoder. Options control various aspects of encoding such as terminal modes (cursor key application mode, keypad mode), protocol selection (Kitty keyboard protocol flags), and platform-specific behaviors (macOS option-as-alt).
If you are using a terminal instance, you can set the key encoding options based on the active terminal state (e.g. legacy vs Kitty mode and associated flags) with ghostty_key_encoder_setopt_from_terminal().
A null pointer value does nothing. It does not reset the value to the default. The setopt call will do nothing.
@param encoder The encoder handle, must not be NULL @param option The option to set @param value Pointer to the value to set (type depends on the option)
@ingroup key