nusb/kb: simplify repeat logic as scancode now contains the info about esc1 extension

This commit is contained in:
cinap_lenrek 2013-05-18 01:46:25 +02:00
parent 506cae05df
commit 4c6c7be688

View file

@ -597,9 +597,7 @@ repeatproc(void* arg)
l = recvul(repeatc); l = recvul(repeatc);
continue; continue;
} }
sc = l; sc = l & 0xff;
if((l>>8) != 0)
sc |= 0x80;
t = Kbdelay; t = Kbdelay;
if(alt(a) == 1){ if(alt(a) == 1){
t = Kbrepeat; t = Kbrepeat;
@ -622,13 +620,7 @@ stoprepeat(KDev *f)
static void static void
startrepeat(KDev *f, uchar sc) startrepeat(KDev *f, uchar sc)
{ {
ulong c; sendul(f->repeatc, sc);
if(isext(sc))
c = SCesc1 << 8 | (sc & 0xff);
else
c = sc;
sendul(f->repeatc, c);
} }
/* /*