Terminal output and key input helpers.
- C++23 compiler and standard library
- Exception support
#include <kaycxx/term.hpp>
using namespace kaycxx::term;
int main() {
auto term = terminal();
term << fg(green)
<< "Ready"
<< reset
<< '\n';
}CMake users consume the installed package with:
find_package(kaycxx-term 1.0.0 CONFIG REQUIRED)
target_link_libraries(my-target PRIVATE kaycxx::term)Non-CMake users can use pkg-config:
c++ $(pkg-config --cflags kaycxx-term) -c main.cpp
c++ main.o $(pkg-config --libs kaycxx-term)- Creating a Terminal explains output streams, ANSI mode selection, and color environment variables.
- Colors and Styles explains SGR styles, basic colors, indexed colors, RGB colors, foregrounds, and backgrounds.
- Cursor Control explains cursor movement, cursor visibility, cursor style, and save/restore.
- Screen Control explains clearing, line/cell insertion and deletion, scrolling, and the alternate screen.
- Links and Titles explains terminal hyperlinks and window title push/pop.
- Input explains raw mode, input mode stacking, key reading, and Windows key sequence mapping.
cmake -B build
cmake --build buildA shared library is built by default. For a static build:
cmake -B build -D BUILD_SHARED_LIBS=OFF
cmake --build buildcmake --install build --prefix /tmp/rootIf no prefix is specified, CMake installs to /usr/local by default on Unix systems.
Run all tests:
cmake --build build --target testGenerate API documentation with Doxygen:
cmake --build build --target apidocThe generated HTML documentation is written to build/apidoc/html/index.html.