Enum KeyBinding

Source
pub enum KeyBinding {
Show 93 variants Break, SoftReset, Reset, DownArrow, UpArrow, LeftArrow, RightArrow, Home, Backspace, FunctionKey(u8), DeleteLine, InsertLine, DeleteCharacter, InsertCharacter, InsertMode, Erase, ClearToEndOfScreen, ClearToEndOfLine, ScrollForward, ScrollBackward, NextPage, PreviousPage, SetTab, ClearTab, ClearAllTabs, Enter, Print, HomeDown, KeyPadUpperLeft, KeyPadUpperRight, KeyPadCenter, KeyPadLowerLeft, KeyPadLowerRight, BackTab, Begin, Cancel, Close, Command, Copy, Create, End, Exit, Find, Help, Mark, Message, Move, Next, Open, Options, Previous, Redo, Reference, Refresh, Replace, Restart, Resume, Save, ShiftBegin, ShiftCancel, ShiftCommand, ShiftCopy, ShiftCreate, ShiftDeleteCharacter, ShiftDeleteLine, Select, ShiftEnd, ShiftClearToEndOfLine, ShiftExit, ShiftFind, ShiftHelp, ShiftHome, ShiftInsertCharacter, ShiftLeftArrow, ShiftMessage, ShiftMove, ShiftNext, ShiftOptions, ShiftPrevious, ShiftPrint, ShiftRedo, ShiftReplace, ShiftRightArrow, ShiftResume, ShiftSave, ShiftSuspend, ShiftUndo, Suspend, Undo, MouseEvent, ResizeEvent, Event, UserDefined(i32),
}
Expand description

Keys returned by NCurses getch() and get_wch() families of functions.

Variants§

§

Break

Break key (unreliable)

§

SoftReset

Soft (partial) reset (unreliable)

§

Reset

Reset or hard reset (unreliable)

§

DownArrow

down-arrow key

§

UpArrow

up-arrow key

§

LeftArrow

left-arrow key

§

RightArrow

right-arrow key

§

Home

home key

§

Backspace

backspace key

§

FunctionKey(u8)

Function keys. Space for 64

§

DeleteLine

delete-line key

§

InsertLine

insert-line key

§

DeleteCharacter

delete-character key

§

InsertCharacter

insert-character key

§

InsertMode

sent by rmir or smir in insert mode

§

Erase

clear-screen or erase key

§

ClearToEndOfScreen

clear-to-end-of-screen key

§

ClearToEndOfLine

clear-to-end-of-line key

§

ScrollForward

scroll-forward key

§

ScrollBackward

scroll-backward key

§

NextPage

next-page key

§

PreviousPage

previous-page key

§

SetTab

set-tab key

§

ClearTab

clear-tab key

§

ClearAllTabs

clear-all-tabs key

§

Enter

enter/send key

§

Print

print key

§

HomeDown

lower-left key (home down)

§

KeyPadUpperLeft

upper left of keypad

§

KeyPadUpperRight

upper right of keypad

§

KeyPadCenter

center of keypad

§

KeyPadLowerLeft

lower left of keypad

§

KeyPadLowerRight

lower right of keypad

§

BackTab

back-tab key

§

Begin

begin key

§

Cancel

cancel key

§

Close

close key

§

Command

command key

§

Copy

copy key

§

Create

create key

§

End

end key

§

Exit

exit key

§

Find

find key

§

Help

help key

§

Mark

mark key

§

Message

message key

§

Move

move key

§

Next

next key

§

Open

open key

§

Options

options key

§

Previous

previous key

§

Redo

redo key

§

Reference

reference key

§

Refresh

refresh key

§

Replace

replace key

§

Restart

restart key

§

Resume

resume key

§

Save

save key

§

ShiftBegin

shifted begin key

§

ShiftCancel

shifted cancel key

§

ShiftCommand

shifted command key

§

ShiftCopy

shifted copy key

§

ShiftCreate

shifted create key

§

ShiftDeleteCharacter

shifted delete-character key

§

ShiftDeleteLine

shifted delete-line key

§

Select

select key

§

ShiftEnd

shifted end key

§

ShiftClearToEndOfLine

shifted clear-to-end-of-line key

§

ShiftExit

shifted exit key

§

ShiftFind

shifted find key

§

ShiftHelp

shifted help key

§

ShiftHome

shifted home key

§

ShiftInsertCharacter

shifted insert-character key

§

ShiftLeftArrow

shifted left-arrow key

§

ShiftMessage

shifted message key

§

ShiftMove

shifted move key

§

ShiftNext

shifted next key

§

ShiftOptions

shifted options key

§

ShiftPrevious

shifted previous key

§

ShiftPrint

shifted print key

§

ShiftRedo

shifted redo key

§

ShiftReplace

shifted replace key

§

ShiftRightArrow

shifted right-arrow key

§

ShiftResume

shifted resume key

§

ShiftSave

shifted save key

§

ShiftSuspend

shifted suspend key

§

ShiftUndo

shifted undo key

§

Suspend

suspend key

§

Undo

undo key

§

MouseEvent

Mouse event has occurred

§

ResizeEvent

Terminal resize event

§

Event

👎Deprecated since 0.6.3: this was deprecated as of NCurses API v6.3.20211021

We were interrupted by an event

§

UserDefined(i32)

A user defined key.

Trait Implementations§

Source§

impl Clone for KeyBinding

Source§

fn clone(&self) -> KeyBinding

Returns a duplicate 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 KeyBinding

Source§

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

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

impl Display for KeyBinding

Source§

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

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

impl From<i32> for KeyBinding

Source§

fn from(key: i32) -> Self

Converts to this type from the input type.
Source§

impl Hash for KeyBinding

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Into<i32> for KeyBinding

Source§

fn into(self) -> i32

Converts this type into the (usually inferred) input type.
Source§

impl PartialEq for KeyBinding

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u32> for KeyBinding

Source§

type Error = NCurseswError

The type returned in the event of a conversion error.
Source§

fn try_from(key: wint_t) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for KeyBinding

Source§

impl Eq for KeyBinding

Source§

impl StructuralPartialEq for KeyBinding

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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 T
where T: Clone,

Source§

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 T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

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

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.