beginnings of an input encoder for my serial tool. it is probably better to have in-tool encoder because it also affects a lot to the user experience. next stop probably supporting also backspace :-) https://github.com/jarkkojs/tior/commit/08bc02c0acf8d3424eb35db44f49debc5394989a

#tior #serial #terminal
feat: transmit UTF-8 characters and new line · jarkkojs/tior@08bc02c

In order to keep dependencies to other crates minimal, start to implement internal encoder for key presses. This initial commit enables UTF-8 characters, and in addition pressing enter sends a new ...

GitHub
this is tested in #Linux and #macOS and is expected to also work in #Windows.
Akkoma

$ tior --help Connect to serial port Usage: tior [OPTIONS] <COMMAND> Commands: open Open TTY list List available devices help Print this message or the help of the given subcommand(s) Options: -b, --baud-rate <BAUD_RATE> Line baud rate [default: 115200] -d, --data-bits <DATA_BITS> Line data bits [default: 8] -f, --flow-control <FLOW_CONTROL> Flow control [default: none] [possible values: none, software, hardware] -p, --parity <PARITY> Parity [default: none] [possible values: none, odd, even] -h, --help Print help -V, --version Print version $ tior list /dev/ttyUSB0 /dev/ttyS0 $ tior open /dev/ttyUSB0

Should also implement polling of the device until it becomes available later on.