-
Notifications
You must be signed in to change notification settings - Fork 0
Text Expansion Strategy
Textpander provides a set of strategies for sending expansion text from typed shortcut words. These strategies vary in terms of speed, reliability, and their interaction with system resources. Below are the detailed descriptions of each strategy:
This strategy uses the NSPasteboard
to send the expansion text. It backs up the old clipboard data, replaces it with the expanded text, pastes it, and then restores the old clipboard data.
-
Pros:
- Fast and efficient.
- Suitable for long form text.
-
Cons:
- Might lead to inconsistent formatting.
- The old clipboard content might not be restored quickly enough, which may cause it to paste old expansion text if paste operation is performed rapidly.
This strategy sends the characters one by one using simulated keypress events.
-
Pros:
- Does not interfere with the clipboard or formatting.
-
Cons:
- Can be quite slow for long text.
This strategy is a variant of the Simulated Keypress method. It sends the characters in chunks (20 characters at a time) rather than one by one.
-
Pros:
- Faster than the basic Simulated Keypress strategy for large text.
This strategy uses Applescript
to send the keyboard input to system events. The first time you choose this strategy, the system may ask you to allow "Automation" permission.
-
Cons:
- Slower than other strategies.
- Does not work well with special characters.
- Will be removed in future versions of Textpander.
Please note that we are still testing these approaches. If you encounter any issues, feel free to open a new issue on our GitHub repository.