Index: ./mac68k/dev/aed.c =================================================================== RCS file: /cvsroot/src/sys/arch/mac68k/dev/aed.c,v retrieving revision 1.42 diff -u -p -r1.42 aed.c --- ./mac68k/dev/aed.c 12 Jan 2025 05:56:59 -0000 1.42 +++ ./mac68k/dev/aed.c 12 Jan 2025 09:10:34 -0000 @@ -215,9 +215,9 @@ aed_emulate_mouse(adb_event_t *event) adb_event_t new_event; int result = 0; - if (event->u.k.key == ADBK_KEYDOWN(ADBK_OPTION)) { + if (event->u.k.key == ADBK_KEYDOWN(ADBK_FLOWER)) { emulmodkey_down = 1; - } else if (event->u.k.key == ADBK_KEYUP(ADBK_OPTION)) { + } else if (event->u.k.key == ADBK_KEYUP(ADBK_FLOWER)) { /* key up */ emulmodkey_down = 0; if (aed_sc->sc_buttons & 0xfe) { @@ -316,8 +316,8 @@ aed_emulate_mouse(adb_event_t *event) case ADBK_KEYDOWN(ADBK_SHIFT): case ADBK_KEYUP(ADBK_CONTROL): case ADBK_KEYDOWN(ADBK_CONTROL): - case ADBK_KEYUP(ADBK_FLOWER): - case ADBK_KEYDOWN(ADBK_FLOWER): + case ADBK_KEYUP(ADBK_OPTION): + case ADBK_KEYDOWN(ADBK_OPTION): /* ctrl, shift, cmd */ aed_dokeyupdown(event); break; @@ -330,7 +330,7 @@ aed_emulate_mouse(adb_event_t *event) new_event = *event; /* send option-down */ - new_event.u.k.key = ADBK_KEYDOWN(ADBK_OPTION); + new_event.u.k.key = ADBK_KEYDOWN(ADBK_FLOWER); new_event.bytes[0] = new_event.u.k.key; microtime(&new_event.timestamp); aed_dokeyupdown(&new_event); @@ -349,7 +349,7 @@ aed_emulate_mouse(adb_event_t *event) aed_dokeyupdown(&new_event); /* send option-up */ - new_event.u.k.key = ADBK_KEYUP(ADBK_OPTION); + new_event.u.k.key = ADBK_KEYUP(ADBK_FLOWER); new_event.bytes[0] = new_event.u.k.key; microtime(&new_event.timestamp); aed_dokeyupdown(&new_event); Index: ./macppc/dev/aed.c =================================================================== RCS file: /cvsroot/src/sys/arch/macppc/dev/aed.c,v retrieving revision 1.36 diff -u -p -r1.36 aed.c --- ./macppc/dev/aed.c 12 Jan 2025 09:07:02 -0000 1.36 +++ ./macppc/dev/aed.c 12 Jan 2025 09:10:34 -0000 @@ -193,9 +193,9 @@ aed_emulate_mouse(adb_event_t *event) adb_event_t new_event; int result = 0; - if (event->u.k.key == ADBK_KEYDOWN(ADBK_OPTION)) { + if (event->u.k.key == ADBK_KEYDOWN(ADBK_FLOWER)) { emulmodkey_down = 1; - } else if (event->u.k.key == ADBK_KEYUP(ADBK_OPTION)) { + } else if (event->u.k.key == ADBK_KEYUP(ADBK_FLOWER)) { /* key up */ emulmodkey_down = 0; if (aed_sc->sc_buttons & 0xfe) { @@ -280,8 +280,8 @@ aed_emulate_mouse(adb_event_t *event) case ADBK_KEYDOWN(ADBK_SHIFT): case ADBK_KEYUP(ADBK_CONTROL): case ADBK_KEYDOWN(ADBK_CONTROL): - case ADBK_KEYUP(ADBK_FLOWER): - case ADBK_KEYDOWN(ADBK_FLOWER): + case ADBK_KEYUP(ADBK_OPTION): + case ADBK_KEYDOWN(ADBK_OPTION): /* ctrl, shift, cmd */ aed_dokeyupdown(event); break; @@ -294,7 +294,7 @@ aed_emulate_mouse(adb_event_t *event) new_event = *event; /* send option-down */ - new_event.u.k.key = ADBK_KEYDOWN(ADBK_OPTION); + new_event.u.k.key = ADBK_KEYDOWN(ADBK_FLOWER); new_event.bytes[0] = new_event.u.k.key; microtime(&new_event.timestamp); aed_dokeyupdown(&new_event); @@ -313,7 +313,7 @@ aed_emulate_mouse(adb_event_t *event) aed_dokeyupdown(&new_event); /* send option-up */ - new_event.u.k.key = ADBK_KEYUP(ADBK_OPTION); + new_event.u.k.key = ADBK_KEYUP(ADBK_FLOWER); new_event.bytes[0] = new_event.u.k.key; microtime(&new_event.timestamp); aed_dokeyupdown(&new_event); Index: ../../share/man/man4/akbd.4 =================================================================== RCS file: /cvsroot/src/share/man/man4/akbd.4,v retrieving revision 1.2 diff -u -p -r1.2 akbd.4 --- ../../share/man/man4/akbd.4 29 Oct 2024 01:44:25 -0000 1.2 +++ ../../share/man/man4/akbd.4 12 Jan 2025 09:10:34 -0000 @@ -48,7 +48,10 @@ driver with support for Apple Desktop Bu .Pp To work around the limited number of buttons found on most ADB mice, one can map key sequences to trigger mouse button events. -To map Option+1, Option+2, Option+3 to mouse buttons 1, 2, and 3 +Command+LeftArrow will work as the middle button and Command+RightArrow will +work as the right button. +.Pp +To map Command+1, Command+2, Command+3 to mouse buttons 1, 2, and 3 respectively, add the following line to your kernel configuration file: .Pp @@ -72,8 +75,8 @@ events, place the following line in your .Pp .Cd options FORCE_FUNCTION_KEYS .Pp -On PowerBook models holding Option and up/down arrows change the screen -brightness. +On PowerBook (mac68k) models holding Command and up/down arrows change the +screen brightness. .Sh SUPPORTED HARDWARE .Nx is known to support the following