NetBSD Problem Report #58303

From www@netbsd.org  Sat Jun  1 22:19:29 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C2C811A9238
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  1 Jun 2024 22:19:29 +0000 (UTC)
Message-Id: <20240601195017.1A31B1A9246@mollari.NetBSD.org>
Date: Sat,  1 Jun 2024 19:50:17 +0000 (UTC)
From: nathanialsloss@yahoo.com.au
Reply-To: nathanialsloss@yahoo.com.au
To: gnats-bugs@NetBSD.org
Subject: ALXBUTTONS and 2/3rd button click does not work on mac68k (Powerbook 160)
X-Send-Pr-Version: www-1.0

>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:    nat
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 01 22:20:01 +0000 2024
>Closed-Date:    Sat Jun 22 08:56:49 +0000 2024
>Last-Modified:  Sat Jun 22 08:56:49 +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;

>Release-Note:

>Audit-Trail:
From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58303 CVS commit: src/sys/arch
Date: Wed, 5 Jun 2024 11:01:47 +0000

 Module Name:	src
 Committed By:	nat
 Date:		Wed Jun  5 11:01:47 UTC 2024

 Modified Files:
 	src/sys/arch/mac68k/dev: aed.c
 	src/sys/arch/macppc/dev: aed.c

 Log Message:
 Pass event up to adb device.

 While here do the same for macppc.

 Addresses PR/58303


 To generate a diff of this commit:
 cvs rdiff -u -r1.38 -r1.39 src/sys/arch/mac68k/dev/aed.c
 cvs rdiff -u -r1.34 -r1.35 src/sys/arch/macppc/dev/aed.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: port-mac68k-maintainer->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Fri, 07 Jun 2024 02:43:55 +0000
Responsible-Changed-Why:
Mine


State-Changed-From-To: open->pending-pullups
State-Changed-By: nat@NetBSD.org
State-Changed-When: Fri, 07 Jun 2024 02:43:55 +0000
State-Changed-Why:
pullup-10 #708
pullup-9  #1847


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58303 CVS commit: [netbsd-10] src/sys/arch
Date: Thu, 20 Jun 2024 18:15:15 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Jun 20 18:15:15 UTC 2024

 Modified Files:
 	src/sys/arch/mac68k/dev [netbsd-10]: aed.c
 	src/sys/arch/macppc/dev [netbsd-10]: aed.c

 Log Message:
 Pull up following revision(s) (requested by nat in ticket #708):

 	sys/arch/macppc/dev/aed.c: revision 1.35
 	sys/arch/mac68k/dev/aed.c: revision 1.39

 Pass event up to adb device.

 While here do the same for macppc.

 Addresses PR/58303


 To generate a diff of this commit:
 cvs rdiff -u -r1.38 -r1.38.4.1 src/sys/arch/mac68k/dev/aed.c
 cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/arch/macppc/dev/aed.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/58303 CVS commit: [netbsd-9] src/sys/arch
Date: Thu, 20 Jun 2024 18:16:23 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Jun 20 18:16:22 UTC 2024

 Modified Files:
 	src/sys/arch/mac68k/dev [netbsd-9]: aed.c
 	src/sys/arch/macppc/dev [netbsd-9]: aed.c

 Log Message:
 Pull up following revision(s) (requested by nat in ticket #1847):

 	sys/arch/macppc/dev/aed.c: revision 1.35
 	sys/arch/mac68k/dev/aed.c: revision 1.39

 Pass event up to adb device.

 While here do the same for macppc.

 Addresses PR/58303


 To generate a diff of this commit:
 cvs rdiff -u -r1.34 -r1.34.8.1 src/sys/arch/mac68k/dev/aed.c
 cvs rdiff -u -r1.30 -r1.30.8.1 src/sys/arch/macppc/dev/aed.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: nat@NetBSD.org
State-Changed-When: Sat, 22 Jun 2024 08:56:49 +0000
State-Changed-Why:
Fixed and pullups completed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.