mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
backtab will now change the explorer tab; use P to change to log
This commit is contained in:
@@ -192,7 +192,8 @@ impl Component<Msg, NoUserEvent> for Log {
|
||||
}
|
||||
// -- comp msg
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::BackTab, ..
|
||||
code: Key::BackTab | Key::Tab | Key::Char('p'),
|
||||
..
|
||||
}) => Some(Msg::Ui(UiMsg::LogBackTabbed)),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
@@ -82,14 +82,11 @@ impl Component<Msg, NoUserEvent> for ExplorerFind {
|
||||
Some(Msg::None)
|
||||
}
|
||||
// -- comp msg
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::BackTab, ..
|
||||
}) => Some(Msg::Ui(UiMsg::ExplorerBackTabbed)),
|
||||
Event::Keyboard(KeyEvent { code: Key::Esc, .. }) => {
|
||||
Some(Msg::Ui(UiMsg::CloseFindExplorer))
|
||||
}
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Left | Key::Right | Key::Tab,
|
||||
code: Key::Left | Key::Right | Key::Tab | Key::BackTab,
|
||||
..
|
||||
}) => Some(Msg::Ui(UiMsg::ChangeTransferWindow)),
|
||||
Event::Keyboard(KeyEvent {
|
||||
@@ -206,14 +203,11 @@ impl Component<Msg, NoUserEvent> for ExplorerLocal {
|
||||
Some(Msg::None)
|
||||
}
|
||||
// -- comp msg
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::BackTab, ..
|
||||
}) => Some(Msg::Ui(UiMsg::ExplorerBackTabbed)),
|
||||
Event::Keyboard(KeyEvent { code: Key::Esc, .. }) => {
|
||||
Some(Msg::Ui(UiMsg::ShowDisconnectPopup))
|
||||
}
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Right | Key::Tab,
|
||||
code: Key::Right | Key::Tab | Key::BackTab,
|
||||
..
|
||||
}) => Some(Msg::Ui(UiMsg::ChangeTransferWindow)),
|
||||
Event::Keyboard(KeyEvent {
|
||||
@@ -275,6 +269,10 @@ impl Component<Msg, NoUserEvent> for ExplorerLocal {
|
||||
code: Key::Char('o') | Key::Function(4),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
}) => Some(Msg::Transfer(TransferMsg::OpenTextFile)),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Char('p'),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
}) => Some(Msg::Ui(UiMsg::ShowLogPanel)),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Char('r') | Key::Function(6),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
@@ -386,14 +384,11 @@ impl Component<Msg, NoUserEvent> for ExplorerRemote {
|
||||
Some(Msg::None)
|
||||
}
|
||||
// -- comp msg
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::BackTab, ..
|
||||
}) => Some(Msg::Ui(UiMsg::ExplorerBackTabbed)),
|
||||
Event::Keyboard(KeyEvent { code: Key::Esc, .. }) => {
|
||||
Some(Msg::Ui(UiMsg::ShowDisconnectPopup))
|
||||
}
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Left | Key::Tab,
|
||||
code: Key::Left | Key::Tab | Key::BackTab,
|
||||
..
|
||||
}) => Some(Msg::Ui(UiMsg::ChangeTransferWindow)),
|
||||
Event::Keyboard(KeyEvent {
|
||||
@@ -455,6 +450,10 @@ impl Component<Msg, NoUserEvent> for ExplorerRemote {
|
||||
code: Key::Char('o') | Key::Function(4),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
}) => Some(Msg::Transfer(TransferMsg::OpenTextFile)),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Char('p'),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
}) => Some(Msg::Ui(UiMsg::ShowLogPanel)),
|
||||
Event::Keyboard(KeyEvent {
|
||||
code: Key::Char('r') | Key::Function(6),
|
||||
modifiers: KeyModifiers::NONE,
|
||||
|
||||
@@ -140,7 +140,6 @@ enum UiMsg {
|
||||
CloseWatchedPathsList,
|
||||
CloseWatcherPopup,
|
||||
Disconnect,
|
||||
ExplorerBackTabbed,
|
||||
LogBackTabbed,
|
||||
Quit,
|
||||
ReplacePopupTabbed,
|
||||
@@ -153,6 +152,7 @@ enum UiMsg {
|
||||
ShowFindPopup,
|
||||
ShowGotoPopup,
|
||||
ShowKeybindingsPopup,
|
||||
ShowLogPanel,
|
||||
ShowMkdirPopup,
|
||||
ShowNewFilePopup,
|
||||
ShowOpenWithPopup,
|
||||
|
||||
@@ -406,7 +406,7 @@ impl FileTransferActivity {
|
||||
self.disconnect();
|
||||
self.umount_disconnect();
|
||||
}
|
||||
UiMsg::ExplorerBackTabbed => {
|
||||
UiMsg::ShowLogPanel => {
|
||||
assert!(self.app.active(&Id::Log).is_ok());
|
||||
}
|
||||
UiMsg::LogBackTabbed => {
|
||||
|
||||
Reference in New Issue
Block a user