ref: fcf385299ac63be5f7e660fbf52a22d420f4603b
parent: 3973ffff1df9d4180903abbfa3cc9d21868a9aae
author: qwx <qwx@sciops.net>
date: Sun Dec 25 06:05:02 EST 2022
nusb/kb: poor man's rotate -90° to landscape mode for generic usb tablet
--- /dev/null
+++ b/nusb-kb-rotate
@@ -1,0 +1,19 @@
+diff 62253b9d1720fb3ce962a5a6b2bdf5588267be8a uncommitted
+--- a//sys/src/cmd/nusb/kb/kb.c
++++ b//sys/src/cmd/nusb/kb/kb.c
+@@ -867,8 +867,13 @@
+ if(s->abs == l->abs && s->x == l->x && s->y == l->y && s->b == l->b)
+ continue;
+ abs = 1;
+- x = s->x;
+- y = s->y;
++ if(f->dev->usb->vid == 0x28bd && f->dev->usb->did == 0x0920){
++ x = s->y;
++ y = 0x80000000UL - s->x;
++ }else{
++ x = s->x;
++ y = s->y;
++ }
+ } else {
+ /* everything needs to be relative */
+ if((s->abs & 3) != 0 || abs)