--- rxvt-unicode/src/command.C 2010/05/23 00:37:19 1.451 +++ rxvt-unicode/src/command.C 2010/08/21 16:07:15 1.454 @@ -773,7 +773,19 @@ { int param = map_function_key (keysym); if (param > 0) - sprintf (kbuf,"\033[%d~", param); + { + int n = sprintf (kbuf,"\033[%d~", param); + /* + * pass Shift/Control indicators for function keys ending with `~' + * + * eg, + * Prior = "ESC[5~" + * Shift+Prior = "ESC[5$" + * Ctrl+Prior = "ESC[5^" + * Ctrl+Shift+Prior = "ESC[5@" + */ + kbuf[n-1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~')); + } else newlen = 0; } @@ -834,18 +846,8 @@ } /* - * these modifications only affect the static keybuffer - * pass Shift/Control indicators for function keys ending with `~' - * - * eg, - * Prior = "ESC[5~" - * Shift+Prior = "ESC[5$" - * Ctrl+Prior = "ESC[5^" - * Ctrl+Shift+Prior = "ESC[5@" * Meta adds an Escape prefix (with META8_OPTION, if meta == ). */ - if (kbuf[0] == C0_ESC && kbuf[1] == '[' && kbuf[len - 1] == '~') - kbuf[len - 1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~')); /* escape prefix */ if (meta @@ -1485,12 +1487,12 @@ case MapNotify: #ifdef HAVE_BG_PIXMAP - /* This is needed spcifically to fix the case of no window manager or a + /* This is needed specifically to fix the case of no window manager or a * non-reparenting window manager. In those cases we never get first * ConfigureNotify. Also that speeds startup under normal WM, by taking - * care of multiplicity of ConfigureNotify events arriwing while WM does + * care of multiplicity of ConfigureNotify events arriving while WM does * reparenting. - * We should not render background immidiately, as there could be several + * We should not render background immediately, as there could be several * ConfigureNotify's to follow. Lets take care of all of them in one scoop * by scheduling background redraw as soon as we can, but giving a short * bit of time for ConfigureNotifies to arrive. @@ -1871,7 +1873,7 @@ #ifdef MOUSE_REPORT_DOUBLECLICK if (ev.button == MEvent.button && clickintime) { - /* same button, within alloted time */ + /* same button, within allowed time */ MEvent.clicks++; if (MEvent.clicks > 1) @@ -3612,7 +3614,7 @@ // 8, auto-repeat keys // DECARM { 9, PrivMode_MouseX10 }, // 18 end FF to printer after print screen - // 19 Print screen prints full screen/scorll region + // 19 Print screen prints full screen/scroll region { 25, PrivMode_VisibleCursor }, // cnorm/cvvis/civis #ifdef scrollBar_esc { scrollBar_esc, PrivMode_scrollBar },