Struct libnotcurses_sys::NcKey

source ·
#[repr(transparent)]
pub struct NcKey(pub u32);
Expand description

A synthesized input event.

This means any input event we can report that isn’t representative of some Unicode. This covers both keyboard and mouse events, as well as signals and even window events.

See also PRETERUNICODEBASE.

Tuple Fields§

§0: u32

Implementations§

source§

impl NcKey

source

pub const Invalid: NcKey = _

source

pub const Resize: NcKey = _

we received SIGWINCH.

source

pub const Up: NcKey = _

source

pub const Right: NcKey = _

source

pub const Down: NcKey = _

source

pub const Left: NcKey = _

source

pub const Ins: NcKey = _

source

pub const Del: NcKey = _

source

pub const Backspace: NcKey = _

source

pub const PgDown: NcKey = _

source

pub const PgUp: NcKey = _

source

pub const Home: NcKey = _

source

pub const End: NcKey = _

source

pub const F00: NcKey = _

source

pub const F01: NcKey = _

source

pub const F02: NcKey = _

source

pub const F03: NcKey = _

source

pub const F04: NcKey = _

source

pub const F05: NcKey = _

source

pub const F06: NcKey = _

source

pub const F07: NcKey = _

source

pub const F08: NcKey = _

source

pub const F09: NcKey = _

source

pub const F10: NcKey = _

source

pub const F11: NcKey = _

source

pub const F12: NcKey = _

source

pub const F13: NcKey = _

source

pub const F14: NcKey = _

source

pub const F15: NcKey = _

source

pub const F16: NcKey = _

source

pub const F17: NcKey = _

source

pub const F18: NcKey = _

source

pub const F19: NcKey = _

source

pub const F20: NcKey = _

source

pub const F21: NcKey = _

source

pub const F22: NcKey = _

source

pub const F23: NcKey = _

source

pub const F24: NcKey = _

source

pub const F25: NcKey = _

source

pub const F26: NcKey = _

source

pub const F27: NcKey = _

source

pub const F28: NcKey = _

source

pub const F29: NcKey = _

source

pub const F30: NcKey = _

source

pub const F31: NcKey = _

source

pub const F32: NcKey = _

source

pub const F33: NcKey = _

source

pub const F34: NcKey = _

source

pub const F35: NcKey = _

source

pub const F36: NcKey = _

source

pub const F37: NcKey = _

source

pub const F38: NcKey = _

source

pub const F39: NcKey = _

source

pub const F40: NcKey = _

source

pub const F41: NcKey = _

source

pub const F42: NcKey = _

source

pub const F43: NcKey = _

source

pub const F44: NcKey = _

source

pub const F45: NcKey = _

source

pub const F46: NcKey = _

source

pub const F47: NcKey = _

source

pub const F48: NcKey = _

source

pub const F49: NcKey = _

source

pub const F50: NcKey = _

source

pub const F51: NcKey = _

source

pub const F52: NcKey = _

source

pub const F53: NcKey = _

source

pub const F54: NcKey = _

source

pub const F55: NcKey = _

source

pub const F56: NcKey = _

source

pub const F57: NcKey = _

source

pub const F58: NcKey = _

source

pub const F59: NcKey = _

source

pub const F60: NcKey = _

source

pub const Enter: NcKey = _

source

pub const Cls: NcKey = _

“clear-screen or erase”

source

pub const DLeft: NcKey = _

down + left on keypad

source

pub const DRight: NcKey = _

source

pub const ULeft: NcKey = _

up + left on keypad

source

pub const URight: NcKey = _

source

pub const Center: NcKey = _

source

pub const Begin: NcKey = _

source

pub const Cancel: NcKey = _

source

pub const Close: NcKey = _

source

pub const Command: NcKey = _

source

pub const Copy: NcKey = _

source

pub const Exit: NcKey = _

source

pub const Print: NcKey = _

source

pub const Refresh: NcKey = _

source

pub const CapsLock: NcKey = _

source

pub const ScrollLock: NcKey = _

source

pub const NumLock: NcKey = _

source

pub const PrintScreen: NcKey = _

source

pub const Pause: NcKey = _

source

pub const Menu: NcKey = _

source

pub const MediaPlay: NcKey = _

source

pub const MediaPause: NcKey = _

source

pub const MediaPPause: NcKey = _

source

pub const MediaRev: NcKey = _

source

pub const MediaStop: NcKey = _

source

pub const MediaFF: NcKey = _

source

pub const MediaRewind: NcKey = _

source

pub const MediaNext: NcKey = _

source

pub const MediaPrev: NcKey = _

source

pub const MediaRecord: NcKey = _

source

pub const MediaLVol: NcKey = _

source

pub const MediaRVol: NcKey = _

source

pub const MediaMute: NcKey = _

source

pub const LShift: NcKey = _

source

pub const LCtrl: NcKey = _

source

pub const LAlt: NcKey = _

source

pub const LSuper: NcKey = _

source

pub const LHyper: NcKey = _

source

pub const LMeta: NcKey = _

source

pub const RShift: NcKey = _

source

pub const RCtrl: NcKey = _

source

pub const RAlt: NcKey = _

source

pub const RSuper: NcKey = _

source

pub const RHyper: NcKey = _

source

pub const RMeta: NcKey = _

source

pub const L3Shift: NcKey = _

AltGr in european keyboards

source

pub const L5Shift: NcKey = _

source

pub const Motion: NcKey = _

source

pub const Button1: NcKey = _

source

pub const Button2: NcKey = _

source

pub const Button3: NcKey = _

source

pub const Button4: NcKey = _

scrollwheel up

source

pub const Button5: NcKey = _

scrollwheel down

source

pub const Button6: NcKey = _

source

pub const Button7: NcKey = _

source

pub const Button8: NcKey = _

source

pub const Button9: NcKey = _

source

pub const Button10: NcKey = _

source

pub const Button11: NcKey = _

source

pub const Signal: NcKey = _

we received SIGCONT

source

pub const Eof: NcKey = _

Will be returned upon reaching the end of input.

source

pub const Tab: NcKey = _

source

pub const Esc: NcKey = _

source

pub const Space: NcKey = _

source§

impl NcKey

source

pub const ScrollUp: NcKey = _

Alias of Button4

source

pub const Scrolldown: NcKey = _

Alias of Button5

source

pub const Return: NcKey = _

Alias of Enter

source§

impl NcKey

source

pub fn is(num: u32) -> bool

Checks whether a number falls in the range of synthesized events.

source

pub fn new(num: u32) -> Option<Self>

Returns a new NcKey if the provided number falls in the correct range.

source

pub fn is_function(&self) -> bool

Returns true if it’s a function key event.

source

pub fn is_media(&self) -> bool

Returns true if it’s a multimedia key event.

source

pub fn is_mouse(&self) -> bool

Returns true if it’s a mouse event.

source

pub fn is_resize(&self) -> bool

Returns true if it’s a resize event.

source

pub fn name(&self) -> &'static str

Returns the name of the current NcKey.

source

pub fn check_name(num: u32) -> &'static str

Returns the name of the NcKey the number would be.

Trait Implementations§

source§

impl Clone for NcKey

source§

fn clone(&self) -> NcKey

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for NcKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for NcKey

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<NcKey> for u32

source§

fn from(k: NcKey) -> Self

Converts to this type from the input type.
source§

impl PartialEq<NcKey> for NcKey

source§

fn eq(&self, other: &NcKey) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for NcKey

source§

impl Eq for NcKey

source§

impl StructuralEq for NcKey

source§

impl StructuralPartialEq for NcKey

Auto Trait Implementations§

§

impl RefUnwindSafe for NcKey

§

impl Send for NcKey

§

impl Sync for NcKey

§

impl Unpin for NcKey

§

impl UnwindSafe for NcKey

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.