sendkeys-macos
Advanced tools
Comparing version 0.2.4 to 0.3.0
{ | ||
"name": "sendkeys-macos", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"description": "Sends keystrokes to a given application with customizable delays to simulate typing", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -79,2 +79,8 @@ # SendKeys for macOS | ||
### Continuation | ||
A continuation can be used to ignore the next character. This is useful to help with formatting a long sequence of character and inserting a new line for authoring purposes. | ||
Insert a continuation using the character sequence `<\>`. The character following the sequence will be skipped over. | ||
## Prerequisites | ||
@@ -81,0 +87,0 @@ |
@@ -47,2 +47,4 @@ const app = Application(/** application-name **/); | ||
const charExpression = /^\<c:(.|[\w]+)(:([,\w⌘^⌥⇧]+))?\>/i; | ||
// matches <\> | ||
const continuationExpression = /^\<\\\>/; | ||
@@ -73,2 +75,9 @@ /** | ||
do { | ||
const continuationMatch = continuationExpression.exec(text.substring(index)); | ||
if (continuationMatch) { | ||
index += continuationMatch[0].length + 1; | ||
continue; | ||
} | ||
const charMatch = charExpression.exec(text.substring(index)); | ||
@@ -75,0 +84,0 @@ |
880079
142
90