@@ -400,18 +400,6 @@ impl Component for Prompt {
402 match event {
402 match event {
403− // char or shift char
405− code: KeyCode::Char(c),
406− modifiers: KeyModifiers::NONE,
409− code: KeyCode::Char(c),
410− modifiers: KeyModifiers::SHIFT,
412− self.insert_char(c);
413− (self.callback_fn)(cx, &self.line, PromptEvent::Update);
415 KeyEvent {
403 KeyEvent {
416 code: KeyCode::Char('c'),
404 code: KeyCode::Char('c'),
417 modifiers: KeyModifiers::CONTROL,
405 modifiers: KeyModifiers::CONTROL,
@@ -539,6 +527,14 @@ impl Component for Prompt {
539 code: KeyCode::Char('q'),
527 code: KeyCode::Char('q'),
540 modifiers: KeyModifiers::CONTROL,
528 modifiers: KeyModifiers::CONTROL,
541 } => self.exit_selection(),
529 } => self.exit_selection(),
530+ // any char event that's not combined with control or mapped to any other combo
532+ code: KeyCode::Char(c),
534+ } if !modifiers.contains(KeyModifiers::CONTROL) => {
535+ self.insert_char(c);
536+ (self.callback_fn)(cx, &self.line, PromptEvent::Update);