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 {
|
match ev {
|
||||||
InputEvent::Key(key) => {
|
InputEvent::Key(key) => {
|
||||||
match key.code {
|
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 => {
|
KeyCode::Enter => {
|
||||||
// Submit
|
// Submit
|
||||||
let input_text: String = self.input_txt.clone();
|
let input_text: String = self.input_txt.clone();
|
||||||
|
|||||||
Reference in New Issue
Block a user