slugbyte / tui-util

a minimal utility for creating interactive terminal software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tui-util

!!UNDER CONSTRUCTION!!

This project is under construction, and will likely have interface changes

About

tui-util is a minimal tool creating interactive tui software. I built tui-util as a learning exercise, to practice using rust and better understand how terminal programs work under the hood.

tui-util is inspired by tools like crossterm , termion, and ncurses.

Roadmap

  • an interface for setting the tty into raw mode
  • an interface for writing ANSI CSI and SGR codes to the tty
  • an event handling system for reacting to keyboard, mouse, and window resize events
    • key events
    • mouse events
    • window resize events

Running the examples

  1. clone this repo
  2. cargo run --example basic

NON-Goals

  • windows support
  • UI elements

TROUBLESHOOTING

Key event matching

  • ctrl-h is ctrl-backspace
  • ctrl-i is tab
  • ctrl-m is as enter
  • ctrl-} is escape
  • no ctrl-esc only alt-esc
  • no ctrl-alt-f* because the kernal uses that to switch switch tty

About

a minimal utility for creating interactive terminal software

License:MIT License


Languages

Language:Rust 100.0%