diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-02-24 14:21:47 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-02-24 14:21:47 +0100 |
commit | 1e14429f4782625ed4ea12edfbd2dfc58da1034e (patch) | |
tree | 8391a7f59552ecf0d90ba6d967f633dcb57c84ce | |
parent | 4235556c16d4eb0be17a4baac1801bfd92541e0a (diff) | |
download | plan9front-1e14429f4782625ed4ea12edfbd2dfc58da1034e.tar.xz |
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.
-rw-r--r-- | sys/src/cmd/aux/kbdfs/kbdfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/aux/kbdfs/kbdfs.c b/sys/src/cmd/aux/kbdfs/kbdfs.c index 19cb130c6..0f659f8bd 100644 --- a/sys/src/cmd/aux/kbdfs/kbdfs.c +++ b/sys/src/cmd/aux/kbdfs/kbdfs.c @@ -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) |