Discussion:
[9fans] Mouse inverted Y-axis
(too old to reply)
Eduard Streahlau
2012-12-16 13:58:38 UTC
Permalink
Ok recompiling the kernel after modifying kb.c did the job,
nusb was documented as userspace program so I never thought of it
thanks
c***@gmx.de
2012-12-16 14:17:44 UTC
Permalink
cool.

they are userspace programs. but for the keyboard to work on
bootup (so you can enter stuff like the root filesystem
location), they are started from a ram filesystem build into
the kernel image. the files that get build into that ram
filesystem are listed in: /sys/src/9/port/bootfs.proto

--
cinap
erik quanstrom
2012-12-16 14:27:29 UTC
Permalink
Post by c***@gmx.de
the kernel image. the files that get build into that ram
filesystem are listed in: /sys/src/9/port/bootfs.proto
that's specific to your 9front. in the distribution, those
files are listed in the config file bootdir section.

- erik
Pavel Klinkovsky
2012-12-17 09:40:53 UTC
Permalink
Post by Eduard Streahlau
Ok recompiling the kernel after modifying kb.c did the job,
Great.
Post by Eduard Streahlau
nusb was documented as userspace program so I never thought of it
I discovered it a some time ago when I had needed to fix the wheel direction of my IBM mouse.

Pavel
Pavel Klinkovsky
2013-02-21 13:39:11 UTC
Permalink
Hi all,

was not something changed in Plan9 kernel(?) in the near past related to the mouse wheel scrolling direction?

I still have opposite scrolling direction when scrolling my mouse wheel (even with my patched kb.c). :(

Thanks for any help.

Pavel
Pavel Klinkovsky
2013-02-22 09:57:51 UTC
Permalink
Hi all,
Post by Pavel Klinkovsky
I still have opposite scrolling direction when scrolling my mouse wheel (even with my patched kb.c). :(
I have found a problem - as usually placed between keyboard and chair. ;)

I made such sequence to install my modification in kb.c:
- cd /sys/src/cmd/usb/kb
- mk
- mk install
- /sys/src/9/pc
- mk 'CONF=pcf'
- cp 9pcf /n/9fat
- reboot
The modification in kb.c was not used.

So I made such sequence to install my modification in kb.c:
- cd /sys/src/cmd/usb (not into kb subdirectory!)
- mk
- mk install
- /sys/src/9/pc
- mk 'CONF=pcf'
- cp 9pcf /n/9fat
- reboot

The modification in kb.c was used.

Sorry for noice... :(

Pavel
erik quanstrom
2013-02-22 10:42:20 UTC
Permalink
Post by Pavel Klinkovsky
- cd /sys/src/cmd/usb (not into kb subdirectory!)
- mk
- mk install
- /sys/src/9/pc
- mk 'CONF=pcf'
- cp 9pcf /n/9fat
- reboot
The modification in kb.c was used.
usb is a pain. i generally rebuild everything from the top
directory. nuke it from orbit. it's the only way to be sure!

- erik
Pavel Klinkovsky
2013-02-22 12:50:59 UTC
Permalink
i generally rebuild everything from the top directory.
I see, good to know. Thanks.

In any case I think there is a bug in kb.c.
The function 'ptrbootpvals' seems correct:

if(c > 3 && ch->buf[3] == 1) /* up */
b |= 0x08;
if(c > 3 && ch->buf[3] == 0xff) /* down */
b |= 0x10;

Wheel-up should set the flag 0x08.
Wheel-down should set the flag 0x10.


But the function 'ptrrepvals' seems buggy:
if(c > 3 && hidifcval(&kd->templ, KindWheel, 0) > 0) /* up */
b |= 0x10;
if(c > 3 && hidifcval(&kd->templ, KindWheel, 0) < 0) /* down */
b |= 0x08;

Wheel-up sets the flag 0x10.
Wheel-down sets the flag 0x08.

Pavel
erik quanstrom
2013-02-22 13:30:05 UTC
Permalink
Post by Pavel Klinkovsky
I see, good to know. Thanks.
In any case I think there is a bug in kb.c.
if(c > 3 && ch->buf[3] == 1) /* up */
b |= 0x08;
if(c > 3 && ch->buf[3] == 0xff) /* down */
b |= 0x10;
Wheel-up should set the flag 0x08.
Wheel-down should set the flag 0x10.
if(c > 3 && hidifcval(&kd->templ, KindWheel, 0) > 0) /* up */
b |= 0x10;
if(c > 3 && hidifcval(&kd->templ, KindWheel, 0) < 0) /* down */
b |= 0x08;
Wheel-up sets the flag 0x10.
Wheel-down sets the flag 0x08.
something's wrong, but is it the code or the comment?

- erik
Pavel Klinkovsky
2013-02-22 14:43:46 UTC
Permalink
Post by erik quanstrom
something's wrong, but is it the code or the comment?
Code.

Pavel

Continue reading on narkive:
Loading...