From 8278e1b85a25ed97bdb5c66a640d0229008bc24f Mon Sep 17 00:00:00 2001 From: rhysd Date: Thu, 16 Jun 2022 20:18:29 +0900 Subject: [PATCH] add missing `Key::Esc` variant --- src/input.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/input.rs b/src/input.rs index 906c406..93f4d52 100644 --- a/src/input.rs +++ b/src/input.rs @@ -21,6 +21,7 @@ pub enum Key { End, PageUp, PageDown, + Esc, /// An invalid key input (this key is always ignored by [`TextArea`](crate::TextArea)). Null, } @@ -104,6 +105,7 @@ impl From for Input { KeyCode::End => Key::End, KeyCode::PageUp => Key::PageUp, KeyCode::PageDown => Key::PageDown, + KeyCode::Esc => Key::Esc, _ => Key::Null, }; Self { key, ctrl, alt } @@ -150,6 +152,7 @@ impl From for Input { PageDown => Key::PageDown, BackTab => Key::Tab, Delete => Key::Delete, + Esc => Key::Esc, _ => Key::Null, };