Skip to content

Commit

Permalink
Update lib.rs and added few more punctuation marks
Browse files Browse the repository at this point in the history
  • Loading branch information
KesharwaniArpita authored Oct 8, 2024
1 parent 111f57c commit 1fdcf15
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions scribe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,33 @@ pub fn allowed_keys(key: &Key) -> Option<char> {
Key::Backspace => Some('\x08'),
Key::Comma => Some(','),
Key::SemiColon => Some(';'),
Key::Period => Some('.'),
Key::Slash => Some('/'),
Key::Backslash => Some('\\'),
Key::Apostrophe => Some('\''),
Key::Equal => Some('='),
Key::Minus => Some('-'),
Key::LBracket => Some('['),
Key::RBracket => Some(']'),
Key::Grave => Some('`'),
Key::Tab => Some('\t'),
Key::Colon => Some(':'), // In case of ':' on certain layouts
Key::Exclamation => Some('!'),
Key::Question => Some('?'),
Key::At => Some('@'),
Key::Hash => Some('#'),
Key::Dollar => Some('$'),
Key::Percent => Some('%'),
Key::Caret => Some('^'),
Key::Ampersand => Some('&'),
Key::Asterisk => Some('*'),
Key::LParen => Some('('),
Key::RParen => Some(')'),
Key::Underscore => Some('_'),
Key::Plus => Some('+'),
Key::Quote => Some('"'),
Key::LessThan => Some('<'),
Key::GreaterThan => Some('>'),
_ => None,
}
}
Expand Down

0 comments on commit 1fdcf15

Please sign in to comment.