[Xquartz-dev] Re-enable fn for fake mouse buttons

Jeremy Huddleston jeremyhu at apple.com
Sat Apr 11 14:24:31 PDT 2009


Pushed.  I had removed it because it wasn't mapped to an X11 key.  I  
forgot that could be used for the simulation as well.

Thanks.

On Apr 11, 2009, at 09:06, Martin Otte wrote:

> With the last few releases, I could no longer use the fn key on my  
> powerbook as a fake mouse modifier.
> Here is patch to darwinEvents.c, based on an earlier commit "Re- 
> enable support for capslock", that allows fn to be used again for  
> fake_button2 or 3:
>
> --- xorg-server-1.4.2-apple41/hw/xquartz/darwinEvents.c.orig     
> 2009-04-11 11:01:07.000000000 -0400
> +++ xorg-server-1.4.2-apple41/hw/xquartz/darwinEvents.c 2009-04-11  
> 11:17:20.000000000 -0400
> @@ -155,7 +155,7 @@ int darwin_modifier_mask_list[] = {
> #else
>     NX_CONTROLMASK, NX_SHIFTMASK, NX_COMMANDMASK, NX_ALTERNATEMASK,
> #endif
> -    NX_ALPHASHIFTMASK,
> +    NX_ALPHASHIFTMASK, NX_SECONDARYFNMASK,
>     0
> };
>
> @@ -175,7 +175,7 @@ static void DarwinUpdateModifiers(
>     }
>
>     for(f=darwin_modifier_mask_list; *f; f++)
> -        if(*f & flags && *f != NX_ALPHASHIFTMASK) {
> +        if(*f & flags && *f != NX_ALPHASHIFTMASK && *f !=  
> NX_SECONDARYFNMASK) {
>             key = DarwinModifierNXMaskToNXKey(*f);
>             if(key == -1)
>                 ErrorF("DarwinUpdateModifiers: Unsupported NXMask: 0x 
> %x\n", *f);
>
>
>
> I prefer to use the fn key for one of the fake clicks because some X  
> apps have a use for shift, control, or option clicks.
>
> Thanks,
> Martin
> _______________________________________________
> Xquartz-dev mailing list
> Xquartz-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev



More information about the Xquartz-dev mailing list