ghostty_key_encoder_setopt_from_terminal function
- @Native<Void Function(GhosttyKeyEncoder, GhosttyTerminal)>(GhosttyKeyEncoder, GhosttyTerminal)>()
- GhosttyKeyEncoder encoder,
- GhosttyTerminal terminal
Set encoder options from a terminal's current state.
Reads the terminal's current modes and flags and applies them to the encoder's options. This sets cursor key application mode, keypad mode, alt escape prefix, modifyOtherKeys state, and Kitty keyboard protocol flags from the terminal state.
Note that the macos_option_as_alt option cannot be determined from
terminal state and is reset to GHOSTTY_OPTION_AS_ALT_FALSE by this
call. Use ghostty_key_encoder_setopt() to set it afterward if needed.
@param encoder The encoder handle, must not be NULL @param terminal The terminal handle, must not be NULL
@ingroup key
Implementation
@ffi.Native<ffi.Void Function(GhosttyKeyEncoder, GhosttyTerminal)>()
external void ghostty_key_encoder_setopt_from_terminal(
GhosttyKeyEncoder encoder,
GhosttyTerminal terminal,
);