ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
keyboard_line_edit_opts_t Struct Reference

Options for interactive line editing. More...

#include <include/ascii-chat/os/keyboard.h>

Data Fields

char * buffer
 Input buffer (modified in-place).
size_t max_len
 Maximum buffer size (including null terminator).
size_t * len
 Current length in bytes (in/out parameter).
size_t * cursor
 Cursor position in bytes (in/out parameter).
bool echo
 Echo characters to terminal.
char mask_char
 Mask character (0 for no masking, '*' for passwords).
const char * prefix
 Prefix to display (e.g., "/" for grep), NULL for none.
bool(* validator )(const char *)
 Optional validator callback (for live feedback).
keyboard_key_t key
 Required pre-read key; KEY_NONE means no input.

Detailed Description

Options for interactive line editing.

Configuration structure for keyboard_read_line_interactive(). Provides control over echo behavior, masking, prefix display, and validation.

Definition at line 203 of file keyboard.h.

Field Documentation

◆ buffer

char* keyboard_line_edit_opts_t::buffer

Input buffer (modified in-place).

Definition at line 204 of file keyboard.h.

◆ cursor

size_t* keyboard_line_edit_opts_t::cursor

Cursor position in bytes (in/out parameter).

Definition at line 207 of file keyboard.h.

◆ echo

bool keyboard_line_edit_opts_t::echo

Echo characters to terminal.

Definition at line 208 of file keyboard.h.

◆ key

keyboard_key_t keyboard_line_edit_opts_t::key

Required pre-read key; KEY_NONE means no input.

Definition at line 212 of file keyboard.h.

◆ len

size_t* keyboard_line_edit_opts_t::len

Current length in bytes (in/out parameter).

Definition at line 206 of file keyboard.h.

◆ mask_char

char keyboard_line_edit_opts_t::mask_char

Mask character (0 for no masking, '*' for passwords).

Definition at line 209 of file keyboard.h.

◆ max_len

size_t keyboard_line_edit_opts_t::max_len

Maximum buffer size (including null terminator).

Definition at line 205 of file keyboard.h.

◆ prefix

const char* keyboard_line_edit_opts_t::prefix

Prefix to display (e.g., "/" for grep), NULL for none.

Definition at line 210 of file keyboard.h.

◆ validator

bool(* keyboard_line_edit_opts_t::validator) (const char *)

Optional validator callback (for live feedback).

Definition at line 211 of file keyboard.h.


The documentation for this struct was generated from the following file: