MCPcopy Create free account
hub / github.com/Pulse-Eight/libcec / ParseCursesKey

Method ParseCursesKey

src/cec-client/curses/CursesControl.cpp:62–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62std::string CCursesControl::ParseCursesKey(void)
63{
64 int key = getch();
65 std::string strKey;
66 switch(key){
67 case KEY_DOWN:
68 strKey = "42";
69 break;
70 case KEY_UP:
71 strKey = "41";
72 break;
73 case 109: // KEY_m
74 strKey = "43";
75 break;
76 case 10: // KEY_ENTER
77 strKey = "6B";
78 break;
79 case 113: // KEY_q
80 strKey = "q";
81 break;
82 }
83
84 return strKey.empty() ?
85 "" :
86 StringUtils::Format("tx %s%s 44 %s", m_in.c_str(), m_out.c_str(), strKey.c_str());
87}

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected