~ft/riow

29bc6afda314f82046952f3008ecb2db2f0a7ca5 — Sigrid Solveig Haflínudóttir 2 years ago 99a6924
don't send over any keys if Kmod4 was used
1 files changed, 7 insertions(+), 4 deletions(-)

M riow.c
M riow.c => riow.c +7 -4
@@ 320,8 320,8 @@ keyevent(Rune r)
static void
process(char *s)
{
	int n, o, oldmod;
	char b[128], *p;
	int n, o;
	Rune r;

	if(*s == 'K' && s[1] == 0)


@@ 339,6 339,8 @@ process(char *s)
			break;
		}

		oldmod = mod;

		if(*s == 'c' && (mod & Mmod4) != 0){
			keyevent(r);
			continue;


@@ 351,10 353,8 @@ process(char *s)
				mod |= Mctl;
			else if(r == Kshift)
				mod |= Mshift;
			else if(r >= '0' && r <= '9' && (mod & (Mshift|Mmod4)) == (Mshift|Mmod4)){
			else if(r >= '0' && r <= '9' && (mod & (Mshift|Mmod4)) == (Mshift|Mmod4))
				keyevent(r);
				continue;
			}
		}else if(*s == 'K'){
			if(r == Kmod4)
				mod &= ~Mmod4;


@@ 364,6 364,9 @@ process(char *s)
				mod &= ~Mshift;
		}

		if((oldmod | mod) & Mmod4)
			continue;

		memmove(b+o, p, n);
		o += n;
	}