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.179 by root, Wed Dec 15 05:39:08 2004 UTC vs.
Revision 1.183 by root, Tue Dec 21 06:43:00 2004 UTC

48#include "../config.h" /* NECESSARY */ 48#include "../config.h" /* NECESSARY */
49#include "rxvt.h" /* NECESSARY */ 49#include "rxvt.h" /* NECESSARY */
50#include "version.h" 50#include "version.h"
51#include "command.h" 51#include "command.h"
52 52
53#include <wchar.h> 53#include <cwchar>
54#include <signal.h> 54#include <csignal>
55 55
56/*----------------------------------------------------------------------*/ 56/*----------------------------------------------------------------------*/
57 57
58#define IS_CONTROL(ch) !((ch) & 0xffffff60UL) 58#define IS_CONTROL(ch) !((ch) & 0xffffff60UL)
59 59
488#endif 488#endif
489 489
490 if (keysym >= 0xFF00 && keysym <= 0xFFFF) 490 if (keysym >= 0xFF00 && keysym <= 0xFFFF)
491 { 491 {
492#ifdef KEYSYM_RESOURCE 492#ifdef KEYSYM_RESOURCE
493 if (! (shft | ctrl) && Keysym_map[keysym & 0xFF] != NULL) 493 if (!(shft | ctrl) && Keysym_map[keysym & 0xFF] != NULL)
494 { 494 {
495 unsigned int l; 495 unsigned int l;
496 const unsigned char *kbuf0; 496 const unsigned char *kbuf0;
497 497
498 kbuf0 = (Keysym_map[keysym & 0xFF]); 498 kbuf0 = (Keysym_map[keysym & 0xFF]);
785 case XK_F35: /* "\033[49~" */ 785 case XK_F35: /* "\033[49~" */
786 FKEY (31, XK_F17); 786 FKEY (31, XK_F17);
787 break; 787 break;
788#undef FKEY 788#undef FKEY
789 default: 789 default:
790 newlen = 0; 790 if (len == 0
791 break; 791 && (keysym & 0xfff0) != 0xff70
792 && (keysym & 0xfff0) != 0xffe0)
793 /* generate a keycode for every remaining keypress */
794 sprintf ((char *)kbuf, "\033[%x;%xA", (unsigned char)ev.state, (unsigned short)keysym);
792 } 795 }
796
793 if (newlen) 797 if (newlen)
794 len = strlen (kbuf); 798 len = strlen (kbuf);
795 } 799 }
796 800
797 /* 801 /*
805 } 809 }
806 else if (ctrl && keysym == XK_minus) 810 else if (ctrl && keysym == XK_minus)
807 { 811 {
808 len = 1; 812 len = 1;
809 kbuf[0] = '\037'; /* Ctrl-Minus generates ^_ (31) */ 813 kbuf[0] = '\037'; /* Ctrl-Minus generates ^_ (31) */
814 }
815 else if (keysym == XK_ISO_Left_Tab)
816 {
817 strcpy (kbuf, "\033[Z");
818 len = 3;
819 }
820 else if (len == 0
821 && (keysym & 0xffe0) != 0xfe00
822 && (keysym < 0xfe50 || keysym > 0xfe6f))
823 {
824 /* generate a keycode for every remaining keypress */
825 len = sprintf ((char *)kbuf, "\033[%x;%xA", (unsigned char)ev.state, (unsigned short)keysym);
810 } 826 }
811 else 827 else
812 { 828 {
813#ifdef META8_OPTION 829#ifdef META8_OPTION
814 /* set 8-bit on */ 830 /* set 8-bit on */
2707 if (len == (size_t)-1) 2723 if (len == (size_t)-1)
2708 return *cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through 2724 return *cmdbuf_ptr++; // the _occasional_ latin1 character is allowed to slip through
2709 2725
2710 // assume wchar == unicode 2726 // assume wchar == unicode
2711 cmdbuf_ptr += len; 2727 cmdbuf_ptr += len;
2712 return wc; 2728 return wc & UNICODE_MASK;
2713 } 2729 }
2714 2730
2715 return NOCHAR; 2731 return NOCHAR;
2716} 2732}
2717 2733

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines