nhamblenne / eighties

A simple graphic library for C++
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Handle text input #14

Open nhamblenne opened 3 years ago

nhamblenne commented 3 years ago

(Splitting from #3) Make eighties::window be an istream. With echo (perhaps optional echo) and limited edit capabilities (BS for sure).

Special functions could send an escape sequence (for sure respect ECMA 35 and ECMA 48 structure, try to be compatible with xterm). See https://invisible-island.net/xterm/ctlseqs/ctlseqs.html for a set.

Mouse click could also sent escape sequences. Either using / as intermediate byte and final byte in p - z { | } ~ should avoid conflicts with what has been used elsewhere (at least that's reserved according to ECMA 48 and wasn't used by DEC according to vt100.org) or use what xterm is using (ESC [ < mod ; x ; y M for press, m for release, other modes aren't really interesting).