e.g., Ctrl+C, Ctrl+Shift+F1, Alt+Left, LeftDown, Ctrl+ScrollUp
| Key | crossterm | termion | Notes |
|---|---|---|---|
<key> |
Event::Key + KeyCode |
Key |
e.g., Enter, F1, A |
<modifier>(+<modifier>)*+<key> |
KeyEvent::modifiers + KeyCode |
Modifier variants in Key |
e.g., Ctrl+Shift+F1; termion supports only specific combinations |
<mouse> |
Event::Mouse + MouseEventKind |
MouseEvent / MouseButton |
e.g., LeftDown, ScrollUp |
<modifier>(+<modifier>)*+<mouse> |
MouseEvent::modifiers + MouseEventKind |
No | Not supported in termion |
| Key | crossterm | termion | Notes |
|---|---|---|---|
Ctrl |
KeyModifiers::CONTROL |
Key::Ctrl |
|
Alt |
KeyModifiers::ALT |
Key::Alt |
|
Shift |
KeyModifiers::SHIFT |
Key::ShiftLeft |
|
Super |
KeyModifiers::SUPER |
No | Rejected by termion conversion |
Hyper |
KeyModifiers::HYPER |
No | Rejected by termion conversion |
Meta |
KeyModifiers::META |
No | Rejected by termion conversion |
Supported key + modifier combinations in termion:
Shift+Left,Shift+Right,Shift+Up,Shift+DownAlt+Left,Alt+Right,Alt+Up,Alt+DownCtrl+Left,Ctrl+Right,Ctrl+Up,Ctrl+DownCtrl+Home,Ctrl+EndShift+Tab(normalized asBackTab)Shift+<char>,Alt+<char>,Ctrl+<char>(single character)
| Key | crossterm | termion | Notes |
|---|---|---|---|
LeftDown |
MouseEventKind::Down |
MouseEvent::Press |
|
RightDown |
MouseEventKind::Down |
MouseEvent::Press |
|
MiddleDown |
MouseEventKind::Down |
MouseEvent::Press |
|
LeftUp |
MouseEventKind::Up |
No | Not supported in termion |
RightUp |
MouseEventKind::Up |
No | Not supported in termion |
MiddleUp |
MouseEventKind::Up |
No | Not supported in termion |
LeftDrag |
MouseEventKind::Drag |
No | Not supported in termion |
RightDrag |
MouseEventKind::Drag |
No | Not supported in termion |
MiddleDrag |
MouseEventKind::Drag |
No | Not supported in termion |
Moved |
MouseEventKind::Moved |
No | Not supported in termion |
ScrollDown |
MouseEventKind::ScrollDown |
MouseButton::WheelDown |
represented as Press(WheelDown, ..) in termion |
ScrollUp |
MouseEventKind::ScrollUp |
MouseButton::WheelUp |
represented as Press(WheelUp, ..) in termion |
ScrollLeft |
MouseEventKind::ScrollLeft |
MouseButton::WheelLeft |
represented as Press(WheelLeft, ..) in termion |
ScrollRight |
MouseEventKind::ScrollRight |
MouseButton::WheelRight |
represented as Press(WheelRight, ..) in termion |
- Mouse inputs with modifiers like
Ctrl+LeftDownare handled by crossterm viaMouseEvent::modifiers, but are not supported in termion. - crossterm does not serialize
KeyCode::Media(_)/KeyCode::Modifier(_)into notation. - crossterm notation supports only
Event::Key/Event::Mouse.
e.g., fg=red,bg=#00FF00,ul=blue,attr=bold|italic
| Key | crossterm | termion | Notes |
|---|---|---|---|
fg=<color> |
ContentStyle::foreground_color |
color::Fg |
|
bg=<color> |
ContentStyle::background_color |
color::Bg |
|
ul=<color> |
ContentStyle::underline_color |
No | Underline color is not supported in termion |
attr=<token|token...> |
Attribute |
style module |
| Key | crossterm | termion | Notes |
|---|---|---|---|
reset, black, red, green, yellow, blue, magenta, cyan, white |
Color enum |
color module |
|
darkgrey, darkred, darkgreen, darkyellow, darkblue, darkmagenta, darkcyan, grey |
Color enum |
No | Not supported in termion |
lightblack, lightred, lightgreen, lightyellow, lightblue, lightmagenta, lightcyan, lightwhite |
No | color module |
Not supported in crossterm |
#RRGGBB |
Color::Rgb |
color::Rgb |
0..255(e.g.,200):Color::AnsiValue/color::AnsiValueexist in backend types, but are currently out of this crate's notation input/output contract. Support for ANSI 256-color tokens may be added in a future release.
| Key | crossterm | termion | Notes |
|---|---|---|---|
reset |
Attribute::Reset |
style::Reset |
|
bold |
Attribute::Bold |
style::Bold |
|
italic |
Attribute::Italic |
style::Italic |
|
crossedout |
Attribute::CrossedOut |
style::CrossedOut |
|
nobold |
Attribute::NoBold |
style::NoBold |
|
noitalic |
Attribute::NoItalic |
style::NoItalic |
|
nounderline |
Attribute::NoUnderline |
style::NoUnderline |
|
noblink |
Attribute::NoBlink |
style::NoBlink |
|
framed |
Attribute::Framed |
style::Framed |
| Key | crossterm | Notes |
|---|---|---|
underlined |
Attribute::Underlined |
|
dim |
Attribute::Dim |
|
slowblink |
Attribute::SlowBlink |
|
rapidblink |
Attribute::RapidBlink |
|
reverse |
Attribute::Reverse |
|
noreverse |
Attribute::NoReverse |
|
notcrossedout |
Attribute::NotCrossedOut |
|
normalintensity |
Attribute::NormalIntensity |
|
doubleunderlined |
Attribute::DoubleUnderlined |
|
undercurled |
Attribute::Undercurled |
|
underdotted |
Attribute::Underdotted |
|
underdashed |
Attribute::Underdashed |
|
hidden |
Attribute::Hidden |
|
fraktur |
Attribute::Fraktur |
|
nohidden |
Attribute::NoHidden |
|
encircled |
Attribute::Encircled |
|
overlined |
Attribute::OverLined |
|
notframedorencircled |
Attribute::NotFramedOrEncircled |
|
notoverlined |
Attribute::NotOverLined |
| Key | termion | Notes |
|---|---|---|
underline |
style::Underline |
|
faint |
style::Faint |
|
blink |
style::Blink |
|
invert |
style::Invert |
|
noinvert |
style::NoInvert |
|
nocrossedout |
style::NoCrossedOut |
|
nofaint |
style::NoFaint |