backtab will now change the explorer tab; use P to change to log

This commit is contained in:
veeso
2022-08-30 15:45:26 +02:00
parent 6a5c248d35
commit 2f1b644a40
12 changed files with 25 additions and 15 deletions

View File

@@ -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,
}

View File

@@ -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,

View File

@@ -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,

View File

@@ -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 => {