pub type NcInput = ncinput;Expand description
Reads and decodes input events.
Reads from stdin and decodes the input to stdout, including synthesized events and mouse events. Notcurses provides input from keyboards and mice.
Single Unicode codepoints are received from the keyboard, directly encoded
as u32.
All events carry an NcInput structure with them.
For mouse events, the x and y coordinates are reported within this struct. For all events, modifiers (e.g. “Alt”) are carried as bools in this struct.
Aliased Type§
#[repr(C)]pub struct NcInput {
pub id: u32,
pub y: i32,
pub x: i32,
pub utf8: [u8; 5],
pub alt: bool,
pub shift: bool,
pub ctrl: bool,
pub evtype: u32,
pub modifiers: u32,
pub ypx: i32,
pub xpx: i32,
pub eff_text: [u32; 4],
}Fields§
§id: u32Unicode codepoint or synthesized NCKEY event
y: i32y/x cell coordinate of event, -1 for undefined
x: i32y/x cell coordinate of event, -1 for undefined
utf8: [u8; 5]utf8 representation, if one exists
alt: boolwas alt held?
shift: boolwas shift held?
ctrl: boolwas ctrl held?
evtype: u32END DEPRECATION
modifiers: u32bitmask over NCKEY_MOD_*
ypx: i32pixel offsets within cell, -1 for undefined
xpx: i32pixel offsets within cell, -1 for undefined
eff_text: [u32; 4]Effective