ascii-chat 0.11.33
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/platform/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
 Pre-read key (use this instead of reading if not KEY_NONE)
 

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 192 of file keyboard.h.

Field Documentation

◆ buffer

char* keyboard_line_edit_opts_t::buffer

Input buffer (modified in-place)

Definition at line 193 of file keyboard.h.

Referenced by log_search_handle_key().

◆ cursor

size_t* keyboard_line_edit_opts_t::cursor

Cursor position in bytes (in/out parameter)

Definition at line 196 of file keyboard.h.

◆ echo

bool keyboard_line_edit_opts_t::echo

Echo characters to terminal.

Definition at line 197 of file keyboard.h.

◆ key

keyboard_key_t keyboard_line_edit_opts_t::key

Pre-read key (use this instead of reading if not KEY_NONE)

Definition at line 201 of file keyboard.h.

◆ len

size_t* keyboard_line_edit_opts_t::len

Current length in bytes (in/out parameter)

Definition at line 195 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 198 of file keyboard.h.

◆ max_len

size_t keyboard_line_edit_opts_t::max_len

Maximum buffer size (including null terminator)

Definition at line 194 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 199 of file keyboard.h.

◆ validator

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

Optional validator callback (for live feedback)

Definition at line 200 of file keyboard.h.


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