Re: Re: Concerns
Piet van Oostrum <[email protected]> 10 Oct 2002 14:13:11 +0200
| Newsgroups | gmane.emacs.macintosh.user |
|---|---|
| Message-ID | <[email protected]> |
>>>>> Carsten Bormann <[email protected]> (CB) writes: CB> That's what the docs say, but not what happens on my Mac with the various CB> USB mice I have. CB> I need to set it to nil to have the wheel button as mouse-2 and the right CB> button as mouse-3. CB> If I set mac-wheel-button-is-mouse-2 to t, the wheel button is mouse-3 CB> and the right button is mouse-2, which is quite confusing of course. Maybe CB> there is some other remapping at work, but I have no idea where to look. The code just has the selection reversed: In macterm.c: static int mac_get_mouse_btn (EventRef ref) { EventMouseButton result = kEventMouseButtonPrimary; GetEventParameter (ref, kEventParamMouseButton, typeMouseButton, NULL, sizeof (EventMouseButton), NULL, &result); switch (result) { case kEventMouseButtonPrimary: return 0; case kEventMouseButtonSecondary: return NILP (Vmac_wheel_button_is_mouse_2) ? 2 : 1; <<<<<<<<< case kEventMouseButtonTertiary: case 4: /* 4 is the number for the mouse wheel button */ return NILP (Vmac_wheel_button_is_mouse_2) ? 1 : 2; <<<<<<<<< default: return 0; } } These two lines should be swapped. E.g. in the current code if mac-wheel-button-is-mouse-2 is NIL and the mouse-wheel is pressed, 1 is returned (i.e. mouse-2), if it is non-nil, 2 is returned (i.e. mouse-3). For the secondary button it is the reverse. Clearly this is the opposite of what it should be. -- Piet van Oostrum <[email protected]> URL: http://www.cs.uu.nl/~piet [PGP] Private email: [email protected] ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf