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

Add Serde support #31

Closed
simonflick opened this issue Jun 24, 2017 · 3 comments · Fixed by #32
Closed

Add Serde support #31

simonflick opened this issue Jun 24, 2017 · 3 comments · Fixed by #32

Comments

@simonflick
Copy link

Implement Serde Serialize and Deserialize traits for Key and MouseButton as optional feature (like in the uuid crate).

@jD91mZM2
Copy link
Contributor

Personal opinion: Why would you serialize a mouse button? 🤔

@simonflick
Copy link
Author

Maybe it's too specific but I ask anyway, because it is very easy to implement. I use enigo to translate game controller input to mouse/keyboard input. The mapping just gets saved as a config file with serde wich is very pleasant. I wanted to use serde's remote derive feature, but apparently it doesn't work on enums. And even then, they don't implement the Clone trait, wich is also needed. I think it would be ok, to just implement Clone but Serde would be nice to have.

@jD91mZM2
Copy link
Contributor

Yeah, I guess this is good. Let me make a pull request :)

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 a pull request may close this issue.

3 participants