mirror of
https://github.com/ByteAtATime/raycast-linux.git
synced 2025-08-30 18:57:25 +00:00
feat(snippets): reduce delay before typing
Previously, we had a 50ms delay between deleting and pasting, as well as a 10ms delay between each keypress. This was intended to be on the safe side and sure the contents get resolved before pasting. However, the delay was a bit overkill, and this commit changes it to 5ms/2ms.
This commit is contained in:
parent
84438402e3
commit
59174dddca
1 changed files with 2 additions and 2 deletions
|
@ -44,7 +44,7 @@ fn with_clipboard_text<F>(text: &str, paste_action: F) -> Result<()>
|
|||
where
|
||||
F: FnOnce() -> Result<()>,
|
||||
{
|
||||
const CLIPBOARD_PASTE_DELAY: Duration = Duration::from_millis(50);
|
||||
const CLIPBOARD_PASTE_DELAY: Duration = Duration::from_millis(5);
|
||||
let _guard = InternalClipboardGuard::new();
|
||||
|
||||
let mut clipboard = Clipboard::new().context("Failed to initialize clipboard")?;
|
||||
|
@ -238,7 +238,7 @@ impl EvdevInputManager {
|
|||
);
|
||||
device.emit(&[press, syn.clone()])?;
|
||||
device.emit(&[release, syn])?;
|
||||
thread::sleep(Duration::from_millis(10));
|
||||
thread::sleep(Duration::from_millis(2));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue