1 using System;
2
3 int main()
4 {
5 int retval = 0;
6 RtInitScreen();
7 RtNoEcho();
8 RtRaw();
9 RtKeyPad();
10 try
11 {
12 int ch = RtGetRawCh();
13 while (ch != keyEscape)
14 {
15 string s = "raw: " + ToString(ch) + ", translated: " + ToString(RtTranslateCh(ch)) + "\n";
16 RtAddStr(s.Chars());
17 ch = RtGetRawCh();
18 }
19 }
20 catch (const Exception& ex)
21 {
22 Console.Error() << ex.Message() << endl();
23 retval = 1;
24 }
25 RtDoneScreen();
26 return retval;
27 }