feat(snippets): add import snippet feature

Currently, our application does not support snippets without keywords. We will have to figure out why it's possible to have a text replacement item without the text to replace.
This commit is contained in:
ByteAtATime 2025-06-25 08:38:14 -07:00
parent 15dbf0692a
commit 56813684e1
No known key found for this signature in database
16 changed files with 433 additions and 114 deletions

View file

@ -47,8 +47,7 @@ impl InputManager for RdevInputManager {
let callback_clone = callback.clone();
thread::spawn(move || {
let cb = move |event: rdev::Event| {
match event.event_type {
let cb = move |event: rdev::Event| match event.event_type {
rdev::EventType::KeyPress(key) => {
if key == Key::ShiftLeft || key == Key::ShiftRight {
*shift_clone_press.lock().unwrap() = true;
@ -64,7 +63,6 @@ impl InputManager for RdevInputManager {
}
}
_ => (),
}
};
if let Err(error) = rdev::listen(cb) {
eprintln!("rdev error: {:?}", error)
@ -387,7 +385,7 @@ impl InputManager for EvdevInputManager {
}
_ => {
xkb_state.update_key(keycode.into(), direction);
},
}
}
}
}