kbdfs: work arround qemu

qemu does not send e0 escape for gray (arrow) keys, no matter
the numlock state. as a work arround, we assume gray key when
numlock is not active.
This commit is contained in:
cinap_lenrek 2015-02-24 14:21:47 +01:00
parent 4235556c16
commit 1e14429f47

View file

@ -291,6 +291,10 @@ kbdputsc(Scan *scan, int c)
if(c >= Nscan)
return;
/* qemu workarround: emulate e0 for numpad */
if(c != 0 && strchr("GHIKMOPQRS", c) != nil)
scan->esc1 |= !scan->num;
if(scan->esc1 && scan->ctl && kbtabctrlesc1[c] != 0)
key.r = kbtabctrlesc1[c];
else if(scan->esc1 && scan->shift && kbtabshiftesc1[c] != 0)