Diff

Differences From Artifact [6ead65f826]:

To Artifact [b835b4bb1a]:


2755
2756
2757
2758
2759
2760
2761

2762
2763
2764
2765















2766
2767
2768
2769
2770
2771
2772
2755
2756
2757
2758
2759
2760
2761
2762




2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784







+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







	      case VK_CLEAR:
		xkey = 'G';
		break;
	    }
	    if (xkey) {
		if (vt52_mode)
		    p += sprintf((char *) p, "\x1B%c", xkey);
		else {
		else if (app_cursor_keys && !cfg.no_applic_c)
		    p += sprintf((char *) p, "\x1BO%c", xkey);
		else
		    p += sprintf((char *) p, "\x1B[%c", xkey);
		    int app_flg = (app_cursor_keys && !cfg.no_applic_c);
		    /* VT100 & VT102 manuals both state the app cursor keys
		     * only work if the app keypad is on.
		     */
		    if (!app_keypad_keys)
			app_flg = 0;
		    /* Useful mapping of Ctrl-arrows */
		    if (shift_state == 2)
			app_flg = !app_flg;

		    if (app_flg)
			p += sprintf((char *) p, "\x1BO%c", xkey);
		    else
			p += sprintf((char *) p, "\x1B[%c", xkey);
		}
		return p - output;
	    }
	}

	/*
	 * Finally, deal with Return ourselves. (Win95 seems to
	 * foul it up when Alt is pressed, for some reason.)