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

Suggestion: Implement Parse #3

Open
cozyGalvinism opened this issue Aug 13, 2022 · 1 comment
Open

Suggestion: Implement Parse #3

cozyGalvinism opened this issue Aug 13, 2022 · 1 comment

Comments

@cozyGalvinism
Copy link
Contributor

I think a nice addition would be to allow for parsing of keys via String so:

a will return the a key, ctrl+c will return the c key with CTRL modifier and so on.

@HactarCE
Copy link
Owner

HactarCE commented Aug 13, 2022

There's several different formats for writing keybinds:

  • ctrl+c (+)
  • ctrl-c (-)
  • C-c (Emacs)
  • ^c (macOS)
  • probably some others?

In my original design for this lib, I thought about supporting ser/deser for each of these formats, but decided against it because it's highly application-specific and I didn't need it. I'm curious what would be most useful for your application, and whether it's possible to just serialize a struct with modifiers and a key like I do here.

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

No branches or pull requests

2 participants