keyseq

Deterministic planner for human-like typing. Turns a string into a sequence of typing events — insert, delete, delay, idle — for a renderer to play back.

demo

Requirements

Install

opam install keyseq

Use

let state = Random.State.make [| 1 |] in
match Keyseq.plan Keyseq.default_config state "Hello, world." with
| Ok events -> Keyseq_terminal.run events
| Error (Keyseq.Invalid_utf8 offset) ->
    Printf.eprintf "invalid UTF-8 at byte %d\n" offset

See examples/demo.ml for a complete, runnable example.

Behavior

Failure modes

License

ISC. See LICENSE.