… | |
… | |
415 | rxvt_term::key_press (XKeyEvent &ev) |
415 | rxvt_term::key_press (XKeyEvent &ev) |
416 | { |
416 | { |
417 | int ctrl, meta, shft, len; |
417 | int ctrl, meta, shft, len; |
418 | KeySym keysym; |
418 | KeySym keysym; |
419 | int valid_keysym; |
419 | int valid_keysym; |
420 | char kbuf[KBUFSZ]; |
420 | char rkbuf[KBUFSZ]; |
|
|
421 | char *kbuf = rkbuf + 1; |
421 | |
422 | |
422 | #if ISO_14755 |
423 | #if ISO_14755 |
423 | if (iso14755buf & ISO_14755_52) |
424 | if (iso14755buf & ISO_14755_52) |
424 | return; |
425 | return; |
425 | #endif |
426 | #endif |
… | |
… | |
856 | #endif |
857 | #endif |
857 | /* nil */ ; |
858 | /* nil */ ; |
858 | } |
859 | } |
859 | } |
860 | } |
860 | |
861 | |
|
|
862 | /* escape prefix */ |
|
|
863 | if (len && meta |
|
|
864 | #ifdef META8_OPTION |
|
|
865 | && meta_char == C0_ESC |
|
|
866 | #endif |
|
|
867 | ) |
|
|
868 | { |
|
|
869 | *--kbuf = C0_ESC; |
|
|
870 | len++; |
|
|
871 | } |
|
|
872 | |
861 | if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_INT, keysym, DT_STR_LEN, kbuf, len, DT_END))) |
873 | if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_INT, keysym, DT_STR_LEN, kbuf, len, DT_END))) |
862 | return; |
874 | return; |
863 | |
875 | |
864 | if (len <= 0) |
876 | if (len <= 0) |
865 | return; /* not mapped */ |
877 | return; /* not mapped */ |
… | |
… | |
868 | if (view_start) |
880 | if (view_start) |
869 | { |
881 | { |
870 | view_start = 0; |
882 | view_start = 0; |
871 | want_refresh = 1; |
883 | want_refresh = 1; |
872 | } |
884 | } |
873 | |
|
|
874 | /* escape prefix */ |
|
|
875 | if (meta |
|
|
876 | #ifdef META8_OPTION |
|
|
877 | && meta_char == C0_ESC |
|
|
878 | #endif |
|
|
879 | ) |
|
|
880 | { |
|
|
881 | const char ch = C0_ESC; |
|
|
882 | tt_write (&ch, 1); |
|
|
883 | } |
|
|
884 | |
885 | |
885 | tt_write (kbuf, (unsigned int)len); |
886 | tt_write (kbuf, (unsigned int)len); |
886 | } |
887 | } |
887 | |
888 | |
888 | void ecb_cold |
889 | void ecb_cold |