mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-09-09 23:46:29 +00:00
chore(snippets): remove unused code
This commit is contained in:
parent
bf6d9a960a
commit
61c804235c
3 changed files with 1 additions and 68 deletions
|
@ -1,6 +1,5 @@
|
|||
use crate::snippets::input_manager::{InputEvent, InputManager};
|
||||
use crate::snippets::manager::SnippetManager;
|
||||
use rdev::Key;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
|
||||
|
@ -12,71 +11,6 @@ pub struct ExpansionEngine {
|
|||
input_manager: Arc<dyn InputManager>,
|
||||
}
|
||||
|
||||
fn key_to_char(key: &Key, is_shifted: bool) -> Option<char> {
|
||||
if let Key::Backspace = key {
|
||||
return Some('\u{8}');
|
||||
}
|
||||
if let Key::Return | Key::KpReturn = key {
|
||||
return Some('\n');
|
||||
}
|
||||
if let Key::Tab = key {
|
||||
return Some('\t');
|
||||
}
|
||||
|
||||
let s = match key {
|
||||
Key::KeyA => "aA",
|
||||
Key::KeyB => "bB",
|
||||
Key::KeyC => "cC",
|
||||
Key::KeyD => "dD",
|
||||
Key::KeyE => "eE",
|
||||
Key::KeyF => "fF",
|
||||
Key::KeyG => "gG",
|
||||
Key::KeyH => "hH",
|
||||
Key::KeyI => "iI",
|
||||
Key::KeyJ => "jJ",
|
||||
Key::KeyK => "kK",
|
||||
Key::KeyL => "lL",
|
||||
Key::KeyM => "mM",
|
||||
Key::KeyN => "nN",
|
||||
Key::KeyO => "oO",
|
||||
Key::KeyP => "pP",
|
||||
Key::KeyQ => "qQ",
|
||||
Key::KeyR => "rR",
|
||||
Key::KeyS => "sS",
|
||||
Key::KeyT => "tT",
|
||||
Key::KeyU => "uU",
|
||||
Key::KeyV => "vV",
|
||||
Key::KeyW => "wW",
|
||||
Key::KeyX => "xX",
|
||||
Key::KeyY => "yY",
|
||||
Key::KeyZ => "zZ",
|
||||
Key::Num0 => "0)",
|
||||
Key::Num1 => "1!",
|
||||
Key::Num2 => "2@",
|
||||
Key::Num3 => "3#",
|
||||
Key::Num4 => "4$",
|
||||
Key::Num5 => "5%",
|
||||
Key::Num6 => "6^",
|
||||
Key::Num7 => "7&",
|
||||
Key::Num8 => "8*",
|
||||
Key::Num9 => "9(",
|
||||
Key::Space => " ",
|
||||
Key::Slash => "/?",
|
||||
Key::Dot => ".>",
|
||||
Key::Comma => ",<",
|
||||
Key::Minus => "-_",
|
||||
Key::Equal => "=+",
|
||||
Key::LeftBracket => "[{",
|
||||
Key::RightBracket => "]}",
|
||||
Key::BackSlash => "\\|",
|
||||
Key::SemiColon => ";:",
|
||||
Key::Quote => "'\"",
|
||||
Key::BackQuote => "`~",
|
||||
_ => return None,
|
||||
};
|
||||
s.chars().nth(if is_shifted { 1 } else { 0 })
|
||||
}
|
||||
|
||||
impl ExpansionEngine {
|
||||
pub fn new(
|
||||
snippet_manager: Arc<SnippetManager>,
|
||||
|
|
|
@ -3,7 +3,7 @@ pub mod input_manager;
|
|||
pub mod manager;
|
||||
pub mod types;
|
||||
|
||||
use tauri::{AppHandle, Manager, State};
|
||||
use tauri::{AppHandle, Manager};
|
||||
use types::Snippet;
|
||||
|
||||
#[tauri::command]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue