mirror of
https://github.com/veeso/termscp.git
synced 2026-09-27 14:31:18 -07:00
Added help footers
This commit is contained in:
committed by
Christian Visintin
parent
2a3d4f2670
commit
a93dbde0c8
@@ -44,7 +44,7 @@ pub use popup::{
|
||||
ErrorPopup, InfoPopup, InstallUpdatePopup, Keybindings, QuitPopup, ReleaseNotes, WaitPopup,
|
||||
WindowSizeError,
|
||||
};
|
||||
pub use text::{HelpText, NewVersionDisclaimer, Subtitle, Title};
|
||||
pub use text::{HelpFooter, NewVersionDisclaimer, Subtitle, Title};
|
||||
|
||||
use tui_realm_stdlib::Phantom;
|
||||
use tuirealm::event::{Event, Key, KeyEvent, KeyModifiers, NoUserEvent};
|
||||
@@ -60,7 +60,10 @@ pub struct GlobalListener {
|
||||
impl Component<Msg, NoUserEvent> for GlobalListener {
|
||||
fn on(&mut self, ev: Event<NoUserEvent>) -> Option<Msg> {
|
||||
match ev {
|
||||
Event::Keyboard(KeyEvent { code: Key::Esc, .. }) => Some(Msg::ShowQuitPopup),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Esc | Key::Function(10),
|
||||
..
|
||||
}) => Some(Msg::ShowQuitPopup),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Char('c'),
|
||||
modifiers: KeyModifiers::CONTROL,
|
||||
@@ -69,6 +72,10 @@ impl Component<Msg, NoUserEvent> for GlobalListener {
|
||||
code: Key::Char('h'),
|
||||
modifiers: KeyModifiers::CONTROL,
|
||||
}) => Some(Msg::ShowKeybindingsPopup),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Function(1),
|
||||
..
|
||||
}) => Some(Msg::ShowKeybindingsPopup),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Char('r'),
|
||||
modifiers: KeyModifiers::CONTROL,
|
||||
|
||||
Reference in New Issue
Block a user