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 replaces the large, brittle `match` statements for key mapping with `lazy_static` `HashMap`s, making the logic declarative and much easier to update.
This commit refactors the `inject_text` method in both `RdevInputManager` and `EvdevInputManager` to utilize a new `with_clipboard_text` function for clipboard operations.
This commit changes the `inject_text` method in both `RdevInputManager` and `EvdevInputManager` to utilize clipboard functionality for text input. This allows for both instantaneous snippet resolving as well as the ability to type symbols not on the keyboard (e.g. ⌘)
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 introduces a new method to parse and resolve placeholders in snippet content, allowing for dynamic content insertion such as clipboard text, current date, and time. Additionally, it implements cursor positioning for better user experience during snippet expansion.
delete keyword after triggering snippet
This commit improves the `inject_text` method to handle backspace characters correctly by buffering text input.
This commit introduces a new `SnippetForm` component for creating snippets, updates the `ViewManager` to handle the new 'create-snippet-form' view, and integrates the form into the main page routing.
This commit implements implements the `inject_text` method using the `enigo` crate for input simulation. A new `ExpansionEngine` is created to listen for keyboard input, maintain a buffer of recent characters, and check against the database for a matching keyword to trigger an expansion.
This commit sets up the codebase for the Snippets feature. Specifically, it implements an InputManager trait, which listens for, well, inputs. In the future, we will be using this to keep track of the user's keypresses, triggering the text expansion when the trigger word is entered.