mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Abort input using <ESC>
This commit is contained in:
@@ -592,6 +592,13 @@ impl FileTransferActivity {
|
||||
match ev {
|
||||
InputEvent::Key(key) => {
|
||||
match key.code {
|
||||
KeyCode::Esc => {
|
||||
// Abort input
|
||||
// Clear current input text
|
||||
self.input_txt.clear();
|
||||
// Set mode back to explorer
|
||||
self.input_mode = InputMode::Explorer;
|
||||
}
|
||||
KeyCode::Enter => {
|
||||
// Submit
|
||||
let input_text: String = self.input_txt.clone();
|
||||
|
||||
Reference in New Issue
Block a user