A c++20 library for working with raw mode in a terminal. See the
examples/
directory for examples on how to use this library, and each
header file in rawterm/
has a relevant markdown file in docs/
when
relevant
See examples/hello_world.cpp
for a simple place to start.
As of v4.0.0
, rawterm can be imported with cmake fetchcontent. Add the
following passage to your CMakeLists.txt file then link to the rawterm
library using target_link_libraries
include(FetchContent)
fetchcontent_declare(
rawterm
GIT_REPOSITORY https://github.com/ttibsi/rawterm
GIT_TAG 25989a41742bd4105a796c9607bb88260cd682fb
)
fetchcontent_makeavailable(rawterm)
Alternatively, if you use zig
as your build system, you can run
zig fetch --save=rawterm git+https://github.com/ttibsi/rawterm
This has only been tested with zig 0.13.0
Refactor header-only library out into a cmake fetch-content project
Added extra constructors and overloads to most classes
Added support to disable any output for debugging purposes with
RAWTERM_DEBUG
environment variable
core.h
- process_keypress()
is now non-blocking, new wait_for_input()
function replaces blocking functionality
core.h
- Added set_terminal_title()
function
core.h
- Added partial_cmp()
function to Pos
struct
color.h
- added function to set full terminal background
cursor.h
- Added get_raw_location()
for raw terminal cursor location
Added proper documentation
Added new extras for functionality that wraps other rawterm sequences
set_header()
functionPaneManager
class for handling window splitting and manipulationAdded new examples:
red_blue_panes.cpp
for pane managementcursor_position.cpp
^m
and enter
are the same key - they both pass \x0d
code to the terminal^i
and tab
are the same key - they both pass \x09
code to the terminalCMD
on macos doesn't return a unique ascii code, and is treated like the
base character being pressedFeel free to add any projects written using rawterm to this list via PR!