A terminal abstraction with platform specific drivers.
This is a work in progress, and usage is not yet recommended.
Things will change, move around and break.
Inspired by system-terminal written by Alex Rønne Petersen.
-
Windows
- STDIN
- Read Key
- Read Single Character (if raw mode is enabled)
- Read Line
- Get encoding
- Set encoding
- Redirect to custom reader
- Is handle redirected?
- STDOUT/STDERR
- Write
- Get encoding
- Set encoding
- Redirect to custom writer
- Is handle redirected?
- Raw mode (enable/disable)
- Signals
- SIGINT (CTRL+C)
- SIGQUIT (CTRL+BREAK)
- Window
- Get width
- Get height
- VT/ANSI emulation (Windows only)
- CUU (Cursor up)
- CUD (Cursor down)
- CUF (Cursor forward)
- CUB (Cursor back)
- CNL (Cursor next line)
- CPL (Cursor previous line)
- CHA (Cursor horizontal absolute)
- CUP (Cursor position)
- ED (Erase in display)
- EL (Erase in line)
- SGR (Selection graphic rendition)
- SCP (Save current cursor position)
- RCP (Restore saved cursor position)
- DECTCEM 25 (Hide cursor)
- DECTCEM 25 (Show cursor)
- DECSET 1049 (Enable alternative buffer)
- DECSET 1049 (Disable alternative buffer)
- STDIN
-
Linux
- STDIN
- Read Key
- Read Single Character
- Read Line
- Get encoding
- Set encoding (NOT SUPPORTED)
- Redirect to custom reader
- Is handle redirected?
- STDOUT/STDERR
- Write
- Get encoding
- Set encoding (NOT SUPPORTED)
- Redirect to custom writer
- Is handle redirected?
- Raw mode (enable/disable)
- Signals
- SIGINT
- SIGQUIT
- Window
- Get width
- Get height
- STDIN
-
macOS
- STDIN
- Read Key
- Read Single Character
- Read Line
- Get encoding
- Set encoding (NOT SUPPORTED)
- Redirect to custom reader
- Is handle redirected?
- STDOUT/STDERR
- Write
- Get encoding
- Set encoding (NOT SUPPORTED)
- Redirect to custom writer
- Is handle redirected?
- Raw mode (enable/disable)
- Signals
- SIGINT
- SIGQUIT
- Window
- Get width
- Get height
- STDIN