fn char_code_to_event(code: KeyCode) -> KeyEvent {
    let modifiers = match code {
        KeyCode::Char(c) if c.is_uppercase() => KeyModifiers::SHIFT,
        _ => KeyModifiers::empty(),
    };
    KeyEvent::new(code, modifiers)
}
// converts KeyCode to KeyEvent (adds shift modifier in case of uppercase characters)
converts KeyCode to KeyEvent (adds shift modifier in case of uppercase characters)
converts KeyCode to KeyEvent ( adds shift modifier in case of uppercase characters )
fn char_code_to_event(code: KeyCode) -> KeyEvent {
    let modifiers = match code {
        KeyCode::Char(c) if c.is_uppercase() => KeyModifiers::SHIFT,
        _ => KeyModifiers::empty(),
    };
    KeyEvent::new(code, modifiers)
}
fn char_code_to_event ( code : KeyCode ) -> KeyEvent { let modifiers = match code { KeyCode :: Char ( c ) if c . is_uppercase ( ) => KeyModifiers :: SHIFT , _ => KeyModifiers :: empty ( ) , } ; KeyEvent :: new ( code , modifiers ) }
converts KeyCode to KeyEvent (adds shift modifier in case of uppercase characters)
converts KeyCode to KeyEvent ( adds shift modifier in case of uppercase characters )
code
KeyCode
code
KeyCode