- case 13:
- break;
- case 10:
- break;
- case 8:
- inplin[strlen(inplin)-1]='\0';
- wmove (inpwin,0,strlen(inplin));
- wclrtoeol( inpwin);
+ case 13: // CARRIAGE RETURN
+ break;
+ case 10: // LINE FEED
+ break;
+ case 262: // HOME key
+ curpos = 0;
+ curx = 0;
+ inpprint(inpwin,inplin,curpos,curx);
+ wrefresh (inpwin);
+ break;
+ case 360: // END key
+ curpos = strlen(inplin);
+ if (strlen(inplin) > mx -1) {
+ curx = strlen(inplin) - mx +1;
+ }
+ else
+ {
+ curx = 0;
+ }
+ inpprint(inpwin,inplin,curpos,curx);
+ wrefresh (inpwin);
+ break;
+ case 330: // DELETE key
+ if (strlen(inplin) > 0) {
+ if (curpos == strlen(inplin)) {
+ inplin[strlen(inplin)-1]='\0';
+ curpos--;
+ }
+ else
+ {
+ strncpy(&inplin[curpos],&inplin[curpos+1],strlen(inplin)-curpos+1);
+ }
+
+
+ inpprint(inpwin,inplin,curpos,curx);