Skip to content
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

all: Add serde aliases to make serialized tokens less verbose #281

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

pentamassiv
Copy link
Collaborator

The DSL was replaced by using serde to serialize and deserialize tokens. The serialized strings are more verbose. I've added serde aliases so that users don't have to type much more than before. This shortens the serialized string from the serde example from:

[Text("Hello World! ❤\u{fe0f}"),MoveMouse(10,10,Rel),Scroll(5,Vertical),Button(Left,Click),Key(Unicode('🔥'),Click),Key(Control,Press),Key(Unicode('a'),Click),Key(Control,Release)]

to:

[t("Hello World! ❤\u{fe0f}"),m(10,10,r),s(5,v),b(l,c),k(uni('🔥'),c),k(ctrl,p),k(uni('a'),c),k(ctrl,r)]

@pentamassiv pentamassiv merged commit f53e26b into enigo-rs:main Apr 22, 2024
30 checks passed
@pentamassiv pentamassiv deleted the less_verbose branch April 22, 2024 11:43
@pentamassiv pentamassiv restored the less_verbose branch August 14, 2024 23:54
@pentamassiv pentamassiv deleted the less_verbose branch August 14, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant