fn emit_sequence(self) -> (bool, Vec<Event>) {
        let mut seq: Vec<Event> = Vec::with_capacity(2);
        match self {
            KeySequence {
                modifier: Modifier::Alt,
                key: c,
                ..
            } => {
                if !c.is_empty() {
                    seq.push(Event::AltChar(c[0]))
                }
            }
            KeySequence {
                modifier: Modifier::Ctrl,
                key: c,
                ..
            } => {
                if !c.is_empty() {
                    seq.push(Event::CtrlChar(c[0]))
                }
            }
            KeySequence {
                takes_count: _,
                modifier: Modifier::Shift,
                key: c,
                ..
            } => {
                if !c.is_empty() {
                    seq.push(Event::Char(c[0].to_ascii_uppercase()))
                }
            }
            // KeySequence{takes_count,
            //     modifier:Modifier::AltCtrl,
            //     key:c} => {seq.push(Event::CtrlAlt(_))},
            // KeySequence{takes_count,
            //     modifier:Modifier::AltShift,
            //     key:c} => {seq.push(Event::CtrlAlt(c))},
            // KeySequence{takes_count,
            //     modifier:Modifier::CtrlShift,
            //     key:c} => {seq.push(Event::AltChar(c))},
            KeySequence {
                takes_count: _,
                modifier: Modifier::NoMod,
                key: c,
                ..
            } => {
                for i in c {
                    seq.push(Event::Char(i))
                }
            }
            _ => {}
        }
        (self.takes_count, seq)
    }
/// Funtion to emit a vector of `Event`s.
Funtion to emit a vector of `Event`s.
Funtion to emit a vector of ` Event ` s .
fn emit_sequence(self) -> (bool, Vec<Event>) {
        let mut seq: Vec<Event> = Vec::with_capacity(2);
        match self {
            KeySequence {
                modifier: Modifier::Alt,
                key: c,
                ..
            } => {
                if !c.is_empty() {
                    seq.push(Event::AltChar(c[0]))
                }
            }
            KeySequence {
                modifier: Modifier::Ctrl,
                key: c,
                ..
            } => {
                if !c.is_empty() {
                    seq.push(Event::CtrlChar(c[0]))
                }
            }
            KeySequence {
                takes_count: _,
                modifier: Modifier::Shift,
                key: c,
                ..
            } => {
                if !c.is_empty() {
                    seq.push(Event::Char(c[0].to_ascii_uppercase()))
                }
            }
            // KeySequence{takes_count,
            //     modifier:Modifier::AltCtrl,
            //     key:c} => {seq.push(Event::CtrlAlt(_))},
            // KeySequence{takes_count,
            //     modifier:Modifier::AltShift,
            //     key:c} => {seq.push(Event::CtrlAlt(c))},
            // KeySequence{takes_count,
            //     modifier:Modifier::CtrlShift,
            //     key:c} => {seq.push(Event::AltChar(c))},
            KeySequence {
                takes_count: _,
                modifier: Modifier::NoMod,
                key: c,
                ..
            } => {
                for i in c {
                    seq.push(Event::Char(i))
                }
            }
            _ => {}
        }
        (self.takes_count, seq)
    }
fn emit_sequence ( self ) -> ( bool , Vec < Event > ) { let mut seq : Vec < Event > = Vec :: with_capacity ( 2 ) ; match self { KeySequence { modifier : Modifier :: Alt , key : c , .. } => { if ! c . is_empty ( ) { seq . push ( Event :: AltChar ( c [ 0 ] ) ) } } KeySequence { modifier : Modifier :: Ctrl , key : c , .. } => { if ! c . is_empty ( ) { seq . push ( Event :: CtrlChar ( c [ 0 ] ) ) } } KeySequence { takes_count : _ , modifier : Modifier :: Shift , key : c , .. } => { if ! c . is_empty ( ) { seq . push ( Event :: Char ( c [ 0 ] . to_ascii_uppercase ( ) ) ) } } // KeySequence{takes_count, //     modifier:Modifier::AltCtrl, //     key:c} => {seq.push(Event::CtrlAlt(_))}, // KeySequence{takes_count, //     modifier:Modifier::AltShift, //     key:c} => {seq.push(Event::CtrlAlt(c))}, // KeySequence{takes_count, //     modifier:Modifier::CtrlShift, //     key:c} => {seq.push(Event::AltChar(c))}, KeySequence { takes_count : _ , modifier : Modifier :: NoMod , key : c , .. } => { for i in c { seq . push ( Event :: Char ( i ) ) } } _ => { } } ( self . takes_count , seq ) }
Funtion to emit a vector of `Event`s.
Funtion to emit a vector of ` Event ` s .
self
self