changeset 54:f6666e7c1a48

More comments.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 10 Nov 2008 08:32:49 +0200
parents 7b98da167a0b
children 5ec3b7d14715
files nnchat.c
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/nnchat.c	Fri Nov 07 22:17:44 2008 +0200
+++ b/nnchat.c	Mon Nov 10 08:32:49 2008 +0200
@@ -1400,7 +1400,7 @@
 				update = TRUE;
 				break;
 			
-			case KEY_UP:
+			case KEY_UP: /* Backwards in input history */
 				if (histPos == 0) {
 					freeBuf(histBuf[0]);
 					histBuf[0] = copyBuf(editBuf);
@@ -1413,7 +1413,7 @@
 				}
 				break;
 				
-			case KEY_DOWN:
+			case KEY_DOWN: /* Forwards in input history */
 				if (histPos > 0) {
 					histPos--;
 					freeBuf(editBuf);
@@ -1422,7 +1422,7 @@
 				}
 				break;
 				
-			case 0x204: /* ctrl+left */
+			case 0x204: /* ctrl+left = Skip words left */
 				while (editBuf->pos > 0 && isspace(editBuf->data[editBuf->pos - 1]))
 					editBuf->pos--;
 				while (editBuf->pos > 0 && !isspace(editBuf->data[editBuf->pos - 1]))
@@ -1430,7 +1430,7 @@
 				update = TRUE;
 				break;
 			
-			case 0x206: /* ctrl+right */
+			case 0x206: /* ctrl+right = Skip words right */
 				while (editBuf->pos < editBuf->len && isspace(editBuf->data[editBuf->pos]))
 					editBuf->pos++;
 				while (editBuf->pos < editBuf->len && !isspace(editBuf->data[editBuf->pos]))
@@ -1440,22 +1440,22 @@
 				update = TRUE;
 				break;
 				
-			case 0x111: /* F9 */
+			case 0x111: /* F9 = Quit */
 				printMsg("Quitting per user request.\n");
 				exitProg = TRUE;
 				break;
 			
-			case 0x109: /* F1 */
+			case 0x109: /* F1 = Toggle insert / overwrite mode */
 				insertMode = !insertMode;
 				update = TRUE;
 				break;
 			
-			case 0x10a: /* F2 */
+			case 0x10a: /* F2 = Clear editbuffer */
 				clearBuf(editBuf);
 				update = TRUE;
 				break;
 			
-			case 0x10b: /* F3 */
+			case 0x10b: /* F3 = Toggle special mode */
 				setMorseMode = !setMorseMode;
 				printMsg("Morse code mode = %d\n", setMorseMode);
 				update = TRUE;