ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.545 by sf-exg, Sat Apr 26 15:05:17 2014 UTC vs.
Revision 1.548 by sf-exg, Tue Apr 29 13:10:06 2014 UTC

415rxvt_term::key_press (XKeyEvent &ev) 415rxvt_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 rkbuf[KBUFSZ]; 420 char rkbuf[KBUFSZ + 1];
421 char *kbuf = rkbuf + 1; 421 char *kbuf = rkbuf + 1;
422 422
423#if ISO_14755 423#if ISO_14755
424 if (iso14755buf & ISO_14755_52) 424 if (iso14755buf & ISO_14755_52)
425 return; 425 return;
697 ) 697 )
698 { 698 {
699 *--kbuf = C0_ESC; 699 *--kbuf = C0_ESC;
700 len++; 700 len++;
701 } 701 }
702
703 if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_INT, keysym, DT_STR_LEN, kbuf, len, DT_END)))
704 return;
702 705
703 if (valid_keysym) 706 if (valid_keysym)
704 { 707 {
705#ifdef KEYSYM_RESOURCE 708#ifdef KEYSYM_RESOURCE
706 if (keyboard->dispatch (this, keysym, ev.state, kbuf, len)) 709 if (keyboard->dispatch (this, keysym, ev.state, kbuf, len))
871 return; 874 return;
872 } 875 }
873#endif 876#endif
874 } 877 }
875 878
876 if (HOOK_INVOKE ((this, HOOK_KEY_PRESS, DT_XEVENT, &ev, DT_INT, keysym, DT_STR_LEN, kbuf, len, DT_END)))
877 return;
878
879 if (len <= 0) 879 if (len <= 0)
880 return; /* not mapped */ 880 return; /* not mapped */
881 881
882 if (option (Opt_scrollTtyKeypress))
883 if (view_start)
884 {
885 view_start = 0;
886 want_refresh = 1;
887 }
888
889 tt_write (kbuf, (unsigned int)len); 882 tt_write_user_input (kbuf, (unsigned int)len);
890} 883}
891 884
892void ecb_cold 885void ecb_cold
893rxvt_term::key_release (XKeyEvent &ev) 886rxvt_term::key_release (XKeyEvent &ev)
894{ 887{
4063 vsnprintf ((char *)buf, 256, fmt, arg_ptr); 4056 vsnprintf ((char *)buf, 256, fmt, arg_ptr);
4064 va_end (arg_ptr); 4057 va_end (arg_ptr);
4065 tt_write (buf, strlen (buf)); 4058 tt_write (buf, strlen (buf));
4066} 4059}
4067 4060
4061/* Write data to the pty as typed by the user. */
4062void
4063rxvt_term::tt_write_user_input (const char *data, unsigned int len)
4064{
4065 if (option (Opt_scrollTtyKeypress))
4066 if (view_start)
4067 {
4068 view_start = 0;
4069 want_refresh = 1;
4070 }
4071
4072 tt_write (data, len);
4073}
4074
4068/* ---------------------------------------------------------------------- */ 4075/* ---------------------------------------------------------------------- */
4069/* Write data to the pty as typed by the user, pasted with the mouse, 4076/* Write data to the pty as typed by the user, pasted with the mouse,
4070 * or generated by us in response to a query ESC sequence. 4077 * or generated by us in response to a query ESC sequence.
4071 */ 4078 */
4072static const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT 4079static const unsigned int MAX_PTY_WRITE = 255; // minimum MAX_INPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines