Commit graph

6 commits

Author SHA1 Message Date
ByteAtATime
b68c4ccb6e
feat(snippets): implement snippet placeholder resolution
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.
2025-06-24 20:50:55 -07:00
ByteAtATime
77f7f8c113
fix(snippets): adjust evdev keycode offset for input handling 2025-06-24 20:35:57 -07:00
ByteAtATime
bf6d9a960a
feat(snippets):
delete keyword after triggering snippet

This commit improves the `inject_text` method to handle backspace characters correctly by buffering text input.
2025-06-24 20:26:44 -07:00
ByteAtATime
de0b26e8ae
feat(snippets): add create snippet form
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.
2025-06-24 20:00:15 -07:00
ByteAtATime
7088cb17fd
feat(snippets): Implement core expansion engine
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.
2025-06-24 18:59:10 -07:00
ByteAtATime
21cd217a26
feat(snippets): implement keyboard event handling
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.
2025-06-24 18:44:22 -07:00