feat: Add TypeVariable Command for Variable Typing Speed#580
feat: Add TypeVariable Command for Variable Typing Speed#580prithvijj wants to merge 1 commit intocharmbracelet:mainfrom
TypeVariable Command for Variable Typing Speed#580Conversation
- Adding in the `TypeVariable` command which types out the given letters in the string, in a variable typing speed, - The typing speed is determined by setting the `TypingSpeedVariable` option, and providing a min and max typing speed range - After every keystroke, it would wait randomly within the min and max typing speed range, such that it feels more human,
|
Hey @prithvijj! Just a note that per #583 (comment) we're going to hold off on this until we've given the feature the green light. Given our internal bandwidth we're aiming to be thoughtful about introducing new features given our internal capacity. Also, one question is the idea here that the two numbers in a directive like |
Yepp all good!
Correct! just providing a range of min and max typing speed such that we wait after each keystroke for a given randomized number within the range, i.e. |
Changes
TypeVariablecommand which types out the given letters in the string, in a variable typing speed,TypingSpeedVariableoption, and providing a min and max typing speed rangeTesting Notes
Created
prits.tapeRan
go run . prits.tapewhich producedprits.gifprits.gif showing the second echo command, has multiple pauses after each keystroke, feeling less robotic
Other Notes
Related to Add a way to have variable typing speed #574
I considered using another
TypeVariablecommand instead of integrating it withinTypeitself. I guess it's easier to keep things separate, instead of multiple options affecting the sameTypecommand,Not sure how the
TypeVariable@would work, would be good to get some direction. DoesTypeVariable@0.1s 2s "blah blah"be okayI think I'm doing something wrong around
parseTypeVariable, in the sense of not parsing the@1sfor indicating speed (i.e. overrides of the speed), Would be cool to get some help/direction on thatIs there anything else I'm missing?