kNCurses/SingleUserInput.hpp

32 lines
738 B
C++
Raw Permalink Normal View History

2022-04-17 10:28:19 +02:00
/**
* @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
2022-04-15 16:59:02 +02:00
#include <ncursesw/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 */