… | |
… | |
771 | |
771 | |
772 | default: |
772 | default: |
773 | { |
773 | { |
774 | int param = map_function_key (keysym); |
774 | int param = map_function_key (keysym); |
775 | if (param > 0) |
775 | if (param > 0) |
|
|
776 | { |
776 | sprintf (kbuf,"\033[%d~", param); |
777 | int n = sprintf (kbuf,"\033[%d~", param); |
|
|
778 | /* |
|
|
779 | * pass Shift/Control indicators for function keys ending with `~' |
|
|
780 | * |
|
|
781 | * eg, |
|
|
782 | * Prior = "ESC[5~" |
|
|
783 | * Shift+Prior = "ESC[5$" |
|
|
784 | * Ctrl+Prior = "ESC[5^" |
|
|
785 | * Ctrl+Shift+Prior = "ESC[5@" |
|
|
786 | */ |
|
|
787 | kbuf[n-1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~')); |
|
|
788 | } |
777 | else |
789 | else |
778 | newlen = 0; |
790 | newlen = 0; |
779 | } |
791 | } |
780 | break; |
792 | break; |
781 | } |
793 | } |
… | |
… | |
832 | view_start = 0; |
844 | view_start = 0; |
833 | want_refresh = 1; |
845 | want_refresh = 1; |
834 | } |
846 | } |
835 | |
847 | |
836 | /* |
848 | /* |
837 | * these modifications only affect the static keybuffer |
|
|
838 | * pass Shift/Control indicators for function keys ending with `~' |
|
|
839 | * |
|
|
840 | * eg, |
|
|
841 | * Prior = "ESC[5~" |
|
|
842 | * Shift+Prior = "ESC[5$" |
|
|
843 | * Ctrl+Prior = "ESC[5^" |
|
|
844 | * Ctrl+Shift+Prior = "ESC[5@" |
|
|
845 | * Meta adds an Escape prefix (with META8_OPTION, if meta == <escape>). |
849 | * Meta adds an Escape prefix (with META8_OPTION, if meta == <escape>). |
846 | */ |
850 | */ |
847 | if (kbuf[0] == C0_ESC && kbuf[1] == '[' && kbuf[len - 1] == '~') |
|
|
848 | kbuf[len - 1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~')); |
|
|
849 | |
851 | |
850 | /* escape prefix */ |
852 | /* escape prefix */ |
851 | if (meta |
853 | if (meta |
852 | #ifdef META8_OPTION |
854 | #ifdef META8_OPTION |
853 | && meta_char == C0_ESC |
855 | && meta_char == C0_ESC |
… | |
… | |
1483 | selection_send (ev.xselectionrequest); |
1485 | selection_send (ev.xselectionrequest); |
1484 | break; |
1486 | break; |
1485 | |
1487 | |
1486 | case MapNotify: |
1488 | case MapNotify: |
1487 | #ifdef HAVE_BG_PIXMAP |
1489 | #ifdef HAVE_BG_PIXMAP |
1488 | /* This is needed spcifically to fix the case of no window manager or a |
1490 | /* This is needed specifically to fix the case of no window manager or a |
1489 | * non-reparenting window manager. In those cases we never get first |
1491 | * non-reparenting window manager. In those cases we never get first |
1490 | * ConfigureNotify. Also that speeds startup under normal WM, by taking |
1492 | * ConfigureNotify. Also that speeds startup under normal WM, by taking |
1491 | * care of multiplicity of ConfigureNotify events arriwing while WM does |
1493 | * care of multiplicity of ConfigureNotify events arriving while WM does |
1492 | * reparenting. |
1494 | * reparenting. |
1493 | * We should not render background immidiately, as there could be several |
1495 | * We should not render background immediately, as there could be several |
1494 | * ConfigureNotify's to follow. Lets take care of all of them in one scoop |
1496 | * ConfigureNotify's to follow. Lets take care of all of them in one scoop |
1495 | * by scheduling background redraw as soon as we can, but giving a short |
1497 | * by scheduling background redraw as soon as we can, but giving a short |
1496 | * bit of time for ConfigureNotifies to arrive. |
1498 | * bit of time for ConfigureNotifies to arrive. |
1497 | * We should render background PRIOR to drawing any text, but AFTER all |
1499 | * We should render background PRIOR to drawing any text, but AFTER all |
1498 | * of ConfigureNotifys for the best results. |
1500 | * of ConfigureNotifys for the best results. |
… | |
… | |
1869 | /* save the xbutton state (for ButtonRelease) */ |
1871 | /* save the xbutton state (for ButtonRelease) */ |
1870 | MEvent.state = ev.state; |
1872 | MEvent.state = ev.state; |
1871 | #ifdef MOUSE_REPORT_DOUBLECLICK |
1873 | #ifdef MOUSE_REPORT_DOUBLECLICK |
1872 | if (ev.button == MEvent.button && clickintime) |
1874 | if (ev.button == MEvent.button && clickintime) |
1873 | { |
1875 | { |
1874 | /* same button, within alloted time */ |
1876 | /* same button, within allowed time */ |
1875 | MEvent.clicks++; |
1877 | MEvent.clicks++; |
1876 | |
1878 | |
1877 | if (MEvent.clicks > 1) |
1879 | if (MEvent.clicks > 1) |
1878 | { |
1880 | { |
1879 | /* only report double clicks */ |
1881 | /* only report double clicks */ |
… | |
… | |
3610 | { 6, PrivMode_relOrigin }, // DECOM |
3612 | { 6, PrivMode_relOrigin }, // DECOM |
3611 | { 7, PrivMode_Autowrap }, // DECAWM |
3613 | { 7, PrivMode_Autowrap }, // DECAWM |
3612 | // 8, auto-repeat keys // DECARM |
3614 | // 8, auto-repeat keys // DECARM |
3613 | { 9, PrivMode_MouseX10 }, |
3615 | { 9, PrivMode_MouseX10 }, |
3614 | // 18 end FF to printer after print screen |
3616 | // 18 end FF to printer after print screen |
3615 | // 19 Print screen prints full screen/scorll region |
3617 | // 19 Print screen prints full screen/scroll region |
3616 | { 25, PrivMode_VisibleCursor }, // cnorm/cvvis/civis |
3618 | { 25, PrivMode_VisibleCursor }, // cnorm/cvvis/civis |
3617 | #ifdef scrollBar_esc |
3619 | #ifdef scrollBar_esc |
3618 | { scrollBar_esc, PrivMode_scrollBar }, |
3620 | { scrollBar_esc, PrivMode_scrollBar }, |
3619 | #endif |
3621 | #endif |
3620 | { 35, PrivMode_ShiftKeys }, // rxvt extension |
3622 | { 35, PrivMode_ShiftKeys }, // rxvt extension |