NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-mac68k/58303: ALXBUTTONS and 2/3rd button click does not work on mac68k (Powerbook 160)



>Number:         58303
>Category:       port-mac68k
>Synopsis:       ALXBUTTONS and 2/3rd button click does not work on mac68k (Powerbook 160)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    port-mac68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 01 22:20:01 +0000 2024
>Originator:     Nat Sloss
>Release:        NetBSD-10.0 apples to -9 and -current
>Organization:
NetBSD
>Environment:
NetBSD princess 10.99.10 NetBSD 10.99.10 (WSFBPWR) #112: Sun 1 Jun 12:38:18 AEDT 2024  build@microrusty:/home/build/nbsd10/sys/arch/mac68k/compile/WSFBPWR mac68k
>Description:
Enabling options ALTXBUTTONS in the WSFB kernel on mac68k and mouse buttons 2 and 3 still do not work.  They didn't work by pressing option left or right arrow either.
>How-To-Repeat:
Boot a mac68k kernel and see if 2nd and 3rd button presses respond in X11 when pressing option left arrow or option right arrow while moving the mouse.
>Fix:
It seems in aed.c there is a function to interpret and emulate the buttons it would pass them to the aed device if opened and should but does not pass them to the corresponding adb device.

Passing the buttons to the event generated when one moves the mouse solves the problem.  It's not pretty as you have to generate a mouse event when holding the option key and an arrow key for the corresponding button.

It is an improvement however.

I have not checked as yet if macppc also needs the same treatment or something similar.

Solved with this patch:

diff -r b497bd3634ab sys/arch/mac68k/dev/aed.c
--- a/sys/arch/mac68k/dev/aed.c Sat May 25 15:37:17 2024 +0000
+++ b/sys/arch/mac68k/dev/aed.c Sun Jun 02 05:37:06 2024 +1000
@@ -164,6 +164,7 @@ aed_input(adb_event_t *event)
                        aed_dokeyupdown(&new_event);
                break;
        case ADBADDR_MS:
+               event->u.m.buttons |= aed_sc->sc_buttons;
                new_event.u.m.buttons |= aed_sc->sc_buttons;
                aed_handoff(&new_event);
                break;



Home | Main Index | Thread Index | Old Index