Christian Burger
ef07c3ac06
* using `get_wch()` now and mapping most of the function keys documented in `vterm_keycodes.h` (not num keypad) * there are still a lot of mappings from ncurses missing (in conjunction with modifier keys, related issue #11) * using mutex to make sure writing to terminal client is serialized
27 lines
602 B
C++
27 lines
602 B
C++
#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 */
|