-
Notifications
You must be signed in to change notification settings - Fork 213
feat(macros): add text/wait steps and added export and import #815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
9f27a5d
8dd004a
25e476e
531f6bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,14 +23,18 @@ const ( | |
MaxMacrosPerDevice = 25 | ||
MaxStepsPerMacro = 10 | ||
MaxKeysPerStep = 10 | ||
MinStepDelay = 50 | ||
MinStepDelay = 10 | ||
MaxStepDelay = 2000 | ||
) | ||
|
||
type KeyboardMacroStep struct { | ||
Keys []string `json:"keys"` | ||
Modifiers []string `json:"modifiers"` | ||
Delay int `json:"delay"` | ||
// Optional: when set, this step types the given text using the configured keyboard layout. | ||
// The delay value is treated as the per-character delay. | ||
Text string `json:"text,omitempty"` | ||
Wait bool `json:"wait,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't we already do that with no keys and delay? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The "Wait" makes a pause explicit, always clears state first, and gives us a future hook; an empty keys+delay is ambiguous and less robust. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll defer to @adamshiervani or @ym on this... I don't think empty-keys+delay is any less robust... but if there's value in wait's implementation, the by all means. Otherwise this seems to be pretty solid |
||
} | ||
|
||
func (s *KeyboardMacroStep) Validate() error { | ||
|
Uh oh!
There was an error while loading. Please reload this page.