kNCurses/include/NCursesPtyWindow/SingleUserInput.hpp
Christian Burger 2863c8ae16 first release v0.1
Basic pseudo terminal capabilities in an ncurses window provided. Can
run at least `nano`, `top` and `sudo`. Probably a lot more. No colors,
yet.
2022-04-23 22:56:47 +02:00

32 lines
729 B
C++

/**
* @brief stores a single user input (printable and function keys)
* @author Christian Burger (christian@krikkel.de)
*/
#ifndef F0E30ED4_3883_40D6_A6EE_08BA4DF9E92E
#define F0E30ED4_3883_40D6_A6EE_08BA4DF9E92E
#include <cursesw.h>
#include <vterm_keycodes.h>
namespace krikkel::NCursesPtyWindow
{
class SingleUserInput
{
public:
SingleUserInput(int resultGetWchCall, wint_t input);
bool isNormalKey();
bool isFunctionKey();
VTermKey mapKeyNcursesToVTerm();
wint_t getRawInput();
private:
wint_t input;
int resultGetWchCall;
void debug();
};
}
#endif /* F0E30ED4_3883_40D6_A6EE_08BA4DF9E92E */