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:
parent
4235556c16
commit
1e14429f47
|
@ -291,6 +291,10 @@ kbdputsc(Scan *scan, int c)
|
||||||
if(c >= Nscan)
|
if(c >= Nscan)
|
||||||
return;
|
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)
|
if(scan->esc1 && scan->ctl && kbtabctrlesc1[c] != 0)
|
||||||
key.r = kbtabctrlesc1[c];
|
key.r = kbtabctrlesc1[c];
|
||||||
else if(scan->esc1 && scan->shift && kbtabshiftesc1[c] != 0)
|
else if(scan->esc1 && scan->shift && kbtabshiftesc1[c] != 0)
|
||||||
|
|
Loading…
Reference in a new issue