Ttibsi / rawterm

C++20 library for building TUI applications
MIT License
4 stars 4 forks source link

refactor signal handling #29

Closed Ttibsi closed 8 months ago

Ttibsi commented 8 months ago

TLDR I now have a boolean set with the rawterm::enable_signals(); function and then in the keybind processing for ctrl+c and ctrl+z, if the boolean is set, I call the relevant signals. This is easier to expand on. I'm hoping this attempt now should make more sense for my text editor project -- but I'm not sure if this allows for the user to expand on what happens when a signal is sent -- I think the user can add their own signal handler as well as the one being called by the library (rawterm.h lines 166-173)