Subject: port-mac68k/3887: 3-button emulation change enables option-[123] to mouse[123]
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kei_sun@ba2.so-net.or.jp>
List: netbsd-bugs
Date: 07/19/1997 10:40:20
>Number: 3887
>Category: port-mac68k
>Synopsis: 3-button emulation change enables option-[123] to mouse[123]
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Jul 18 18:50:03 1997
>Last-Modified:
>Originator: SUNAGAWA Keiki
>Organization:
>Release: 17 July 1997
>Environment:
X11 or dt with Apple keyboard, Apple IIGS keyboard, Apple keyboard II
System: NetBSD pppce68 1.2G NetBSD 1.2G (MINT) #69: Fri Jul 18 08:38:48 JST 1997 kei@mint:/sys/arch/mac68k/compile/MINT mac68k
>Description:
With the current 3-button mouse emulation, it is difficalt
for me to popup the font menu of xterm (ctrl-right button)
and select item from it because it need to press the keys
'option-ctrl-right arrow,' but the right arrow key are so
far away from the modifier keys in the standard keyboards.
>How-To-Repeat:
Press option-{left,right} arrow key.
>Fix:
--- adb.c.orig Mon Jun 16 20:44:08 1997
+++ adb.c Sun Jul 13 00:30:07 1997
@@ -228,28 +228,46 @@
adb_dokeyupdown(&new_event);
}
} else if (optionkey_down) {
- if (event->u.k.key == ADBK_KEYDOWN(ADBK_LEFT)) {
+ if (event->u.k.key == ADBK_KEYDOWN(ADBK_1)) {
+ adb_ms_buttons |= 1; /* left down */
+ new_event.def_addr = ADBADDR_MS;
+ new_event.u.m.buttons = adb_ms_buttons;
+ new_event.u.m.dx = new_event.u.m.dy = 0;
+ microtime(&new_event.timestamp);
+ adb_dokeyupdown(&new_event);
+ } else if (event->u.k.key == ADBK_KEYUP(ADBK_1)) {
+ adb_ms_buttons &= ~1; /* left up */
+ new_event.def_addr = ADBADDR_MS;
+ new_event.u.m.buttons = adb_ms_buttons;
+ new_event.u.m.dx = new_event.u.m.dy = 0;
+ microtime(&new_event.timestamp);
+ adb_dokeyupdown(&new_event);
+ } else if ((event->u.k.key == ADBK_KEYDOWN(ADBK_LEFT)) ||
+ (event->u.k.key == ADBK_KEYDOWN(ADBK_2))) {
adb_ms_buttons |= 2; /* middle down */
new_event.def_addr = ADBADDR_MS;
new_event.u.m.buttons = adb_ms_buttons;
new_event.u.m.dx = new_event.u.m.dy = 0;
microtime(&new_event.timestamp);
adb_dokeyupdown(&new_event);
- } else if (event->u.k.key == ADBK_KEYUP(ADBK_LEFT)) {
+ } else if ((event->u.k.key == ADBK_KEYUP(ADBK_LEFT)) ||
+ (event->u.k.key == ADBK_KEYUP(ADBK_2))) {
adb_ms_buttons &= ~2; /* middle up */
new_event.def_addr = ADBADDR_MS;
new_event.u.m.buttons = adb_ms_buttons;
new_event.u.m.dx = new_event.u.m.dy = 0;
microtime(&new_event.timestamp);
adb_dokeyupdown(&new_event);
- } else if (event->u.k.key == ADBK_KEYDOWN(ADBK_RIGHT)) {
+ } else if ((event->u.k.key == ADBK_KEYDOWN(ADBK_RIGHT)) ||
+ (event->u.k.key == ADBK_KEYDOWN(ADBK_3))) {
adb_ms_buttons |= 4; /* right down */
new_event.def_addr = ADBADDR_MS;
new_event.u.m.buttons = adb_ms_buttons;
new_event.u.m.dx = new_event.u.m.dy = 0;
microtime(&new_event.timestamp);
adb_dokeyupdown(&new_event);
- } else if (event->u.k.key == ADBK_KEYUP(ADBK_RIGHT)) {
+ } else if ((event->u.k.key == ADBK_KEYUP(ADBK_RIGHT)) ||
+ (event->u.k.key == ADBK_KEYUP(ADBK_3))) {
adb_ms_buttons &= ~4; /* right up */
new_event.def_addr = ADBADDR_MS;
new_event.u.m.buttons = adb_ms_buttons;
>Audit-Trail:
>Unformatted: