Enum crossterm_winapi::InputRecord
source · pub enum InputRecord {
KeyEvent(KeyEventRecord),
MouseEvent(MouseEvent),
WindowBufferSizeEvent(WindowBufferSizeRecord),
FocusEvent(FocusEventRecord),
MenuEvent(MenuEventRecord),
}
Expand description
An input event.
These records can be read from the input buffer by using the ReadConsoleInput
or PeekConsoleInput
function, or written to the input buffer by using the
WriteConsoleInput
function.
Variants§
KeyEvent(KeyEventRecord)
A keyboard event occurred.
MouseEvent(MouseEvent)
The mouse was moved or a mouse button was pressed.
WindowBufferSizeEvent(WindowBufferSizeRecord)
A console screen buffer was resized.
FocusEvent(FocusEventRecord)
A focus event occured. This is used only internally by Windows and should be ignored.
MenuEvent(MenuEventRecord)
A menu event occurred. This is used only internally by Windows and should be ignored.
Trait Implementations§
source§impl Clone for InputRecord
impl Clone for InputRecord
source§fn clone(&self) -> InputRecord
fn clone(&self) -> InputRecord
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InputRecord
impl Debug for InputRecord
source§impl From<INPUT_RECORD> for InputRecord
impl From<INPUT_RECORD> for InputRecord
source§fn from(record: INPUT_RECORD) -> Self
fn from(record: INPUT_RECORD) -> Self
Converts to this type from the input type.
source§impl PartialEq<InputRecord> for InputRecord
impl PartialEq<InputRecord> for InputRecord
source§fn eq(&self, other: &InputRecord) -> bool
fn eq(&self, other: &InputRecord) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.