diff options
| -rw-r--r-- | sys/src/cmd/rio/dat.h | 1 | ||||
| -rw-r--r-- | sys/src/cmd/rio/rio.c | 2 | ||||
| -rw-r--r-- | sys/src/cmd/rio/wind.c | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/sys/src/cmd/rio/dat.h b/sys/src/cmd/rio/dat.h index 3d4193d40..17d0747ae 100644 --- a/sys/src/cmd/rio/dat.h +++ b/sys/src/cmd/rio/dat.h @@ -343,3 +343,4 @@ int errorshouldabort; int menuing; /* menu action is pending; waiting for window to be indicated */ int snarfversion; /* updated each time it is written */ int messagesize; /* negotiated in 9P version setup */ +int shiftdown; diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c index 2300563a0..9c8ea3f9c 100644 --- a/sys/src/cmd/rio/rio.c +++ b/sys/src/cmd/rio/rio.c @@ -345,6 +345,8 @@ keyboardthread(void*) threadsetname("keyboardthread"); while(s = recvp(kbdchan)){ + if(*s == 'k' || *s == 'K') + shiftdown = utfrune(s+1, Kshift) != nil; if(input == nil || sendp(input->ck, s) <= 0) free(s); } diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c index 2ebafd05f..b9c56ab6e 100644 --- a/sys/src/cmd/rio/wind.c +++ b/sys/src/cmd/rio/wind.c @@ -618,7 +618,7 @@ wkeyctl(Window *w, Rune r) if(!w->mouseopen) switch(r){ case Kdown: - n = w->maxlines/3; + n = shiftdown ? 1 : w->maxlines/3; goto case_Down; case Kscrollonedown: n = mousescrollsize(w->maxlines); @@ -632,7 +632,7 @@ wkeyctl(Window *w, Rune r) wsetorigin(w, q0, TRUE); return; case Kup: - n = w->maxlines/3; + n = shiftdown ? 1 : w->maxlines/3; goto case_Up; case Kscrolloneup: n = mousescrollsize(w->maxlines); |
