unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Mac OSX Mouse Button Mapping (was Concerns)
       [not found] <wzhefu8pbc.fsf@cs.uu.nl>
@ 2002-10-11  1:12 ` Steven Tamm
  0 siblings, 0 replies; only message in thread
From: Steven Tamm @ 2002-10-11  1:12 UTC (permalink / raw)
  Cc: Carsten Bormann, mac-emacs-users

	* macterm.c (syms_of_macterm, mac_get_mouse_btn): Reversed
	functionality of mac-wheel-button-is-mouse-2 to be correct.  Also
	switched the default to Qnil from Qt.

You are, as is now painfully obvious, correct.  The code was reversed 
and so was the value of the default value.  I've checked in the change 
to CVS now; the default value for mac_wheel_button_is_mouse_2 is now 
Qnil.   My mouse appears to be working differently with new drivers 
(and Jaguar), this may have caused my confusion.  After using VNC for a 
little bit, I saw what was going on.

Thanks again,
-Steven

On Thursday, October 10, 2002, at 05:13  AM, Piet van Oostrum wrote:

>>>>>> Carsten Bormann <cabo@tzi.org> (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.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-11  1:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <wzhefu8pbc.fsf@cs.uu.nl>
2002-10-11  1:12 ` Mac OSX Mouse Button Mapping (was Concerns) Steven Tamm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).