k9withabone / autocast

Automate terminal demos
https://crates.io/crates/autocast
GNU General Public License v3.0
75 stars 4 forks source link

!Str prefix for interactive keys to pass a string #5

Closed DAmesberger closed 3 months ago

DAmesberger commented 7 months ago

This is a proposal for implementing a !Str prefix for keys. Currently, the default delay is not taken into account, but this would work:

- !Interactive
  keys:
    - !Str hello
    - 2s
    - ^X
    - n
k9withabone commented 6 months ago

Thanks for the PR! I think it might be better to implement this by keeping the Key enum the same and instead change the deserialization for the keys field of Instruction::Interactive via #[serde(deserialize_with = "..."].

k9withabone commented 5 months ago

@DAmesberger is it ok if I close this and work on the alternative I described myself? Or are you still interested in working on this?

DAmesberger commented 3 months ago

Sorry, I completely missed that comment. Sure, go ahead, it was just a quick fix and I am not that deep into that codebase, and time is scarce at the moment on my side, so currently I would not have time anyways.