Mercurial > hg > nnchat
comparison nnchat.c @ 411:664b94a58dbe
Add few comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 24 May 2012 06:23:43 +0300 |
parents | 7ea78f4a4d23 |
children | 3e64acb433e8 |
comparison
equal
deleted
inserted
replaced
410:7ea78f4a4d23 | 411:664b94a58dbe |
---|---|
1749 | 1749 |
1750 /* Handle several buffered keypresses at once */ | 1750 /* Handle several buffered keypresses at once */ |
1751 do | 1751 do |
1752 { | 1752 { |
1753 c = wgetch(stdscr); | 1753 c = wgetch(stdscr); |
1754 | |
1755 /* Handle various problematic cases where terminal | |
1756 * keycodes do not get properly translated by curses | |
1757 */ | |
1754 if (c == 0x1b) | 1758 if (c == 0x1b) |
1755 { | 1759 { |
1760 /* ^[O */ | |
1756 c = wgetch(stdscr); | 1761 c = wgetch(stdscr); |
1757 if (c == 'O') | 1762 if (c == 'O') |
1758 { | 1763 { |
1759 c = wgetch(stdscr); | 1764 c = wgetch(stdscr); |
1760 switch (c) | 1765 switch (c) |
1769 if (optDebug) | 1774 if (optDebug) |
1770 printMsg(currWin, "Unhandled ESC-O key sequence 0x%02x\n", c); | 1775 printMsg(currWin, "Unhandled ESC-O key sequence 0x%02x\n", c); |
1771 break; | 1776 break; |
1772 } | 1777 } |
1773 } | 1778 } |
1779 /* ^[[ */ | |
1774 else if (c == '[') | 1780 else if (c == '[') |
1775 { | 1781 { |
1776 c = wgetch(stdscr); | 1782 c = wgetch(stdscr); |
1777 switch (c) | 1783 switch (c) |
1778 { | 1784 { |