allow uppercase chars to be captured during suppressed input (#6199)

This commit is contained in:
Darren Schroeder 2022-07-31 08:12:13 -05:00 committed by GitHub
parent 26caf7e1b2
commit a83bd4ab20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,12 @@ impl Command for Input {
match crossterm::event::read() {
Ok(Event::Key(k)) => match k.code {
// TODO: maintain keycode parity with existing command
KeyCode::Char(_) if k.modifiers != KeyModifiers::NONE => continue,
KeyCode::Char(_)
if k.modifiers == KeyModifiers::ALT
|| k.modifiers == KeyModifiers::CONTROL =>
{
continue
}
KeyCode::Char(c) => buf.push(c),
KeyCode::Backspace => {
let _ = buf.pop();