From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9717 invoked from network); 17 Jun 2021 14:08:52 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 17 Jun 2021 14:08:52 -0000 Received: from mail-ua1-f41.google.com ([209.85.222.41]) by 1ess; Thu Jun 17 09:07:58 -0400 2021 Received: by mail-ua1-f41.google.com with SMTP id t22so442668uar.13 for <9front@9front.org>; Thu, 17 Jun 2021 06:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=68pht3RZOJzq8YCwvi/XmWdPEnZi//IQlYkT5aiFCF0=; b=UWlaQtO1nO4fH5KxaOne4D2tM2ZFIfEJarbbKnNuwh1dh3KbgjLGGnn5h0/GEmGNEa Npj0C2D/UqeutxY9qBSdpGYL1nCwFwYEQ1oZllBVRzdbKBlpQ+fRbnQn7PM2BSBdXqcQ 5QWYFQUbtd7WRsckzniwvjN++KvplzFdUGPEDO5mJpAIWdRCfb4xUio/rw4WhJv17Pls bRvrmZPM2BqLPgNvhgMLCAVmHoulkI6Y5R1x95H3TkBuGmC6dTvKr8KhAeU/koISa28G REj6eHMtV1csrTvV2JBbClD747yBod311shTDL+yUNdQYbI2ELWfG+FHXTrmchw4mAws Or2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=68pht3RZOJzq8YCwvi/XmWdPEnZi//IQlYkT5aiFCF0=; b=kvQssj5TDlKqKaoiIh46MsPd0/LR8hUcn8Z9jczy+18xaFSpaqEdzbD1HZTCL3KY6f sYlYh8sDYLhIOZfS/35yqSDi88xQKWD5NzLLQVAD95k0EBywkcht30rXsyFtPanbbcyD lXqcMD2F26PpFu2TwbA/VuDksnd5f/083waoCKyyekzKf1RKJ0hQWgl+ZbgjYCJcABvM a9VK7s6Qdhk9P8jxfXQoeYRxuvSjyIWSMXjFYI45ukMRvPaESVucqFbP2+vI31F0f7fW jn5OzqyKiRF3+JMNtjs0spoPahSA8qj73YbvYCEQ0aZYdyfKMwhsE9lavCBgKkTt2cXb FuFg== X-Gm-Message-State: AOAM531P7VwiYvAHTbLETF37xB/HHgjdZa8mWA6cJRtv+aLyqoCGqdAG DAQ4anesG5fF/yv2ELxuAlzcmvO5/IfDVGZkwLeVYgCQQDQ= X-Google-Smtp-Source: ABdhPJxt7m51/Y0v7NkZNWqdNf5mskrhTSOZuyxZZuUjbw+1N1O4xZ8DtM+nyYQE4Q97Vpayg2kO6f1seirjJUc1Ylg= X-Received: by 2002:a25:ba85:: with SMTP id s5mr6153017ybg.336.1623934883198; Thu, 17 Jun 2021 06:01:23 -0700 (PDT) MIME-Version: 1.0 References: <30B545776E29A4E640E836E519922FB9@smtp.pobox.com> <563D14CB53F7F48874972EFD3B968D76@9lab.org> In-Reply-To: <563D14CB53F7F48874972EFD3B968D76@9lab.org> From: Eric Lynema Date: Thu, 17 Jun 2021 09:01:11 -0400 Message-ID: To: 9front@9front.org Content-Type: multipart/alternative; boundary="000000000000d9fa9505c4f5cd6c" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: asynchronous RESTful component-based table framework-scale control Subject: Re: [9front] drawterm/gui-cocoa/screen.m: mouse button emulation a la plan9port Reply-To: 9front@9front.org Precedence: bulk --000000000000d9fa9505c4f5cd6c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Would this also work on the windows port? I would love to have the option to not cary around a mouse if I didn't need to. On Thu, Jun 17, 2021, 3:50 AM wrote: > Quoth unobe@cpan.org: > > Did this patch request get lost? Or was there an issue with it? > > I have never followed up and pushed for it. Maybe now is an opportune > moment to resume that effort=E2=80=A6 > > There is actually one much more grave issue in the Darwin port > of Drawterm that happens when the cursor is updated frequently. > > Try navigating to a website with netsurf and hover over links > so the cursor changes frequently. Very likely you run into > a SEGFAULT. This happens on OSX Catalina and BigSur. > > Here is the fix for it: > > mac: fix SEGFAULT during cursor updates > =E2=80=A2 > https://github.com/1g0rb0hm/drawterm/commit/01a3a73ebebfd765918f6104e5815= 4e7a7f56cff > > Will resurrect the patches and resubmit them, the one with the > simulated buttons as well as the fix for the SEGFAULT. > > BTW. if you are interested in having Audio via Drawterm on OSX you > might be interested in this one (thanks to Tony Mendoza > https://github.com/tmendoza/drawterm-macos-audio): > > =E2=80=A2 > https://github.com/1g0rb0hm/drawterm/commit/9dbda7617c22f4efe4bb58224bd5d= 99ce36da8e7 > > Cheers, > Igor > > > > > Quoth boehm.igor@gmail.com: > > > Dear all, > > > > > > Inline is a patch that eases the use of drawterm on mac laptops that > > > lack mouse buttons. > > > > > > For consistency reasons it behaves the same as on plan9port, namely > > > like this: > > > > > > "For systems without a three button mouse, the keyboard modifier keys > > > can be used to modify the effect of the main mouse button. On Mac > > > systems, the option key changes the main button to button 2, and the > > > Command key changes it to button 3. > > > > > > Pressing the key after the button is held down adds the button to for= m > > > a chord, so that for example on Macs selecting text with the trackpad > > > button and then typing Option without letting go of the button will > > > cause a 1-2 chord, cutting the selection. > > > > > > These changes were inspired by rsc's plan9port." > > > > > > If you prefer to view this diff on GitHub here is a link: > > > > https://github.com/1g0rb0hm/drawterm/commit/6cc968737b0ba5476516b698d8a53= 9d5a2b26b62 > > > > > > If this is not the right place to propose drawterm patches or if > > > changes should be made please let me know. > > > > > > Cheers, > > > Igor > > > > > > diff -r 1f70be1f0305 gui-cocoa/screen.m > > > --- a/gui-cocoa/screen.m Wed Nov 18 23:01:01 2020 +0100 > > > +++ b/gui-cocoa/screen.m Mon Dec 21 15:12:23 2020 +0100 > > > @@ -364,43 +364,76 @@ > > > kbdkey(m, 0); > > > } > > > > > > +- (void)sendmouse:(NSUInteger)b > > > +{ > > > + NSPoint p; > > > + Point q; > > > + > > > + p =3D [self.window mouseLocationOutsideOfEventStream]; > > > + q.x =3D p.x; > > > + q.y =3D p.y; > > > + if(!ptinrect(q, gscreen->clipr)) return; > > > + absmousetrack(p.x, self.frame.size.height - p.y, b, ticks()); > > > +} > > > + > > > - (void)flagsChanged:(NSEvent*)event { > > > - static NSEventModifierFlags y; > > > - NSEventModifierFlags x; > > > + static NSEventModifierFlags omod; > > > + NSEventModifierFlags m; > > > + NSUInteger b; > > > > > > - x =3D [event modifierFlags]; > > > - if((x & ~y & NSEventModifierFlagShift) !=3D 0) > > > - kbdkey(Kshift, 1); > > > - if((x & ~y & NSEventModifierFlagControl) !=3D 0) > > > - kbdkey(Kctl, 1); > > > - if((x & ~y & NSEventModifierFlagOption) !=3D 0) > > > - kbdkey(Kalt, 1); > > > - if((x & ~y & NSEventModifierFlagCapsLock) !=3D 0) > > > - kbdkey(Kcaps, 1); > > > - if((~x & y & NSEventModifierFlagShift) !=3D 0) > > > - kbdkey(Kshift, 0); > > > - if((~x & y & NSEventModifierFlagControl) !=3D 0) > > > - kbdkey(Kctl, 0); > > > - if((~x & y & NSEventModifierFlagOption) !=3D 0) > > > - kbdkey(Kalt, 0); > > > - if((x & ~y & NSEventModifierFlagCapsLock) !=3D 0) > > > - kbdkey(Kcaps, 0); > > > - y =3D x; > > > + m =3D [event modifierFlags]; > > > + b =3D [NSEvent pressedMouseButtons]; > > > + b =3D b & ~6 | b << 1 & 4 | b >> 1 & 2; > > > + if(b){ > > > + if(m & ~omod & NSEventModifierFlagControl) > > > + b |=3D 1; > > > + if(m & ~omod & NSEventModifierFlagOption) > > > + b |=3D 2; > > > + if(m & ~omod & NSEventModifierFlagCommand) > > > + b |=3D 4; > > > + [self sendmouse:b]; > > > + }else{ > > > + if((m & ~omod & NSEventModifierFlagShift) !=3D 0) > > > + kbdkey(Kshift, 1); > > > + if((m & ~omod & NSEventModifierFlagControl) !=3D 0) > > > + kbdkey(Kctl, 1); > > > + if((m & ~omod & NSEventModifierFlagOption) !=3D 0) > > > + kbdkey(Kalt, 1); > > > + if((m & ~omod & NSEventModifierFlagCapsLock) !=3D 0) > > > + kbdkey(Kcaps, 1); > > > + if((~m & omod & NSEventModifierFlagShift) !=3D 0) > > > + kbdkey(Kshift, 0); > > > + if((~m & omod & NSEventModifierFlagControl) !=3D 0) > > > + kbdkey(Kctl, 0); > > > + if((~m & omod & NSEventModifierFlagOption) !=3D 0) > > > + kbdkey(Kalt, 0); > > > + if((m & ~omod & NSEventModifierFlagCapsLock) !=3D 0) > > > + kbdkey(Kcaps, 0); > > > + } > > > + omod =3D m; > > > } > > > > > > - (void)mouseevent:(NSEvent*)event > > > { > > > - NSPoint p; > > > - Point q; > > > - NSUInteger u; > > > + NSUInteger b; > > > + NSEventModifierFlags m; > > > > > > - p =3D [self.window mouseLocationOutsideOfEventStream]; > > > - u =3D [NSEvent pressedMouseButtons]; > > > - q.x =3D p.x; > > > - q.y =3D p.y; > > > - if(!ptinrect(q, gscreen->clipr)) return; > > > - u =3D u & ~6 | u << 1 & 4 | u >> 1 & 2; > > > - absmousetrack(p.x, self.frame.size.height - p.y, u, ticks()); > > > + b =3D [NSEvent pressedMouseButtons]; > > > + b =3D b & ~6 | b << 1 & 4 | b >> 1 & 2; > > > + if(b=3D=3D1){ > > > + m =3D [event modifierFlags]; > > > + if(m & NSEventModifierFlagOption) > > > + b=3D2; > > > + else if(m & NSEventModifierFlagCommand) > > > + b=3D4; > > > + else if(m & NSEventModifierFlagControl) > > > + b=3D8; > > > + }else if(b=3D=3D4){ > > > + m =3D [event modifierFlags]; > > > + if(m & NSEventModifierFlagCommand) > > > + b=3D8; > > > + } > > > + [self sendmouse:b]; > > > } > > > > > > - (void) mouseDown:(NSEvent*)event { [self mouseevent:event]; } > > > > > > > > > > > > > --000000000000d9fa9505c4f5cd6c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Would this also work on the windows port? I would lo= ve to have the option to not cary around a mouse if I didn't need to.
On T= hu, Jun 17, 2021, 3:50 AM <igor@9lab.o= rg> wrote:
Quoth unobe@cpan.org<= /a>:
> Did this patch request get lost? Or was there an issue with it?

I have never followed up and pushed for it. Maybe now is an opportune
moment to resume that effort=E2=80=A6

There is actually one much more grave issue in the Darwin port
of Drawterm that happens when the cursor is updated frequently.

Try navigating to a website with netsurf and hover over links
so the cursor changes frequently. Very likely you run into
a SEGFAULT. This happens on OSX Catalina and BigSur.

Here is the fix for it:

mac: fix SEGFAULT during cursor updates
=E2=80=A2
https://github.com/1g0rb0hm/drawterm/commit/01a3a73ebebfd765918f6104e5= 8154e7a7f56cff

Will resurrect the patches and resubmit them, the one with the
simulated buttons as well as the fix for the SEGFAULT.

BTW.=C2=A0 if you are interested in having Audio via Drawterm on OSX you might be interested in this one (thanks to Tony Mendoza
https://github.com/tmendoza/drawterm-maco= s-audio):

=E2=80=A2 https://github.com/1g0rb0hm/drawterm/commit/9dbda7617c22f4efe4bb58224b= d5d99ce36da8e7

Cheers,
Igor

>
> Quoth boehm.igor@gmail.com:
> > Dear all,
> >
> > Inline is a patch that eases the use of drawterm on mac laptops t= hat
> > lack mouse buttons.
> >
> > For consistency reasons it behaves the same as on plan9port, name= ly
> > like this:
> >
> > "For systems without a three button mouse, the keyboard modi= fier keys
> > can be used to modify the effect of the main mouse button.=C2=A0 = On Mac
> > systems, the option key changes the main button to button 2, and = the
> > Command key changes it to button 3.
> >
> > Pressing the key after the button is held down adds the button to= form
> > a chord, so that for example on Macs selecting text with the trac= kpad
> > button and then typing Option without letting go of the button wi= ll
> > cause a 1-2 chord, cutting the selection.
> >
> > These changes were inspired by rsc's plan9port."
> >
> > If you prefer to view this diff on GitHub here is a link:
> > https://github.com/1g0rb0hm/drawterm/commit/6cc968737b0ba5476516b698d8= a539d5a2b26b62
> >
> > If this is not the right place to propose drawterm patches or if<= br> > > changes should be made please let me know.
> >
> > Cheers,
> > Igor
> >
> > diff -r 1f70be1f0305 gui-cocoa/screen.m
> > --- a/gui-cocoa/screen.m=C2=A0 =C2=A0 Wed Nov 18 23:01:01 2020 +0= 100
> > +++ b/gui-cocoa/screen.m=C2=A0 =C2=A0 Mon Dec 21 15:12:23 2020 +0= 100
> > @@ -364,43 +364,76 @@
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(m, 0);
> >=C2=A0 }
> >=C2=A0
> > +- (void)sendmouse:(NSUInteger)b
> > +{
> > +=C2=A0 =C2=A0NSPoint p;
> > +=C2=A0 =C2=A0Point q;
> > +
> > +=C2=A0 =C2=A0p =3D [self.window mouseLocationOutsideOfEventStrea= m];
> > +=C2=A0 =C2=A0q.x =3D p.x;
> > +=C2=A0 =C2=A0q.y =3D p.y;
> > +=C2=A0 =C2=A0if(!ptinrect(q, gscreen->clipr)) return;
> > +=C2=A0 =C2=A0absmousetrack(p.x, self.frame.size.height - p.y, b,= ticks());
> > +}
> > +
> >=C2=A0 - (void)flagsChanged:(NSEvent*)event {
> > -=C2=A0 =C2=A0static NSEventModifierFlags y;
> > -=C2=A0 =C2=A0NSEventModifierFlags x;
> > +=C2=A0 =C2=A0static NSEventModifierFlags omod;
> > +=C2=A0 =C2=A0NSEventModifierFlags m;
> > +=C2=A0 =C2=A0NSUInteger b;
> >=C2=A0
> > -=C2=A0 =C2=A0x =3D [event modifierFlags];
> > -=C2=A0 =C2=A0if((x & ~y & NSEventModifierFlagShift) !=3D= 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kshift, 1);
> > -=C2=A0 =C2=A0if((x & ~y & NSEventModifierFlagControl) != =3D 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kctl, 1);
> > -=C2=A0 =C2=A0if((x & ~y & NSEventModifierFlagOption) != =3D 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kalt, 1);
> > -=C2=A0 =C2=A0if((x & ~y & NSEventModifierFlagCapsLock) != =3D 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kcaps, 1);
> > -=C2=A0 =C2=A0if((~x & y & NSEventModifierFlagShift) !=3D= 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kshift, 0);
> > -=C2=A0 =C2=A0if((~x & y & NSEventModifierFlagControl) != =3D 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kctl, 0);
> > -=C2=A0 =C2=A0if((~x & y & NSEventModifierFlagOption) != =3D 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kalt, 0);
> > -=C2=A0 =C2=A0if((x & ~y & NSEventModifierFlagCapsLock) != =3D 0)
> > -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0kbdkey(Kcaps, 0);
> > -=C2=A0 =C2=A0y =3D x;
> > +=C2=A0 =C2=A0m =3D [event modifierFlags];
> > +=C2=A0 =C2=A0b =3D [NSEvent pressedMouseButtons];
> > +=C2=A0 =C2=A0b =3D b & ~6 | b << 1 & 4 | b >>= ; 1 & 2;
> > +=C2=A0 =C2=A0if(b){
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(m & ~omod & = NSEventModifierFlagControl)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0b |=3D 1;
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(m & ~omod & = NSEventModifierFlagOption)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0b |=3D 2;
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(m & ~omod & = NSEventModifierFlagCommand)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0b |=3D 4;
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[self sendmouse:b];
> > +=C2=A0 =C2=A0}else{
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((m & ~omod &= NSEventModifierFlagShift) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kshift, 1);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((m & ~omod &= NSEventModifierFlagControl) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kctl, 1);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((m & ~omod &= NSEventModifierFlagOption) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kalt, 1);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((m & ~omod &= NSEventModifierFlagCapsLock) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kcaps, 1);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((~m & omod &= NSEventModifierFlagShift) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kshift, 0);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((~m & omod &= NSEventModifierFlagControl) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kctl, 0);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((~m & omod &= NSEventModifierFlagOption) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kalt, 0);
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if((m & ~omod &= NSEventModifierFlagCapsLock) !=3D 0)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0kbdkey(Kcaps, 0);
> > +=C2=A0 =C2=A0}
> > +=C2=A0 =C2=A0omod =3D m;
> >=C2=A0 }
> >=C2=A0
> >=C2=A0 - (void)mouseevent:(NSEvent*)event
> >=C2=A0 {
> > -=C2=A0 =C2=A0NSPoint p;
> > -=C2=A0 =C2=A0Point q;
> > -=C2=A0 =C2=A0NSUInteger u;
> > +=C2=A0 =C2=A0NSUInteger b;
> > +=C2=A0 =C2=A0NSEventModifierFlags m;
> >=C2=A0
> > -=C2=A0 =C2=A0p =3D [self.window mouseLocationOutsideOfEventStrea= m];
> > -=C2=A0 =C2=A0u =3D [NSEvent pressedMouseButtons];
> > -=C2=A0 =C2=A0q.x =3D p.x;
> > -=C2=A0 =C2=A0q.y =3D p.y;
> > -=C2=A0 =C2=A0if(!ptinrect(q, gscreen->clipr)) return;
> > -=C2=A0 =C2=A0u =3D u & ~6 | u << 1 & 4 | u >>= ; 1 & 2;
> > -=C2=A0 =C2=A0absmousetrack(p.x, self.frame.size.height - p.y, u,= ticks());
> > +=C2=A0 =C2=A0b =3D [NSEvent pressedMouseButtons];
> > +=C2=A0 =C2=A0b =3D b & ~6 | b << 1 & 4 | b >>= ; 1 & 2;
> > +=C2=A0 =C2=A0if(b=3D=3D1){
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0m =3D [event modifierFl= ags];
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(m & NSEventModif= ierFlagOption)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0b=3D2;
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else if(m & NSEvent= ModifierFlagCommand)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0b=3D4;
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0else if(m & NSEvent= ModifierFlagControl)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0b=3D8;
> > +=C2=A0 =C2=A0}else if(b=3D=3D4){
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0m =3D [event modifierFl= ags];
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if(m & NSEventModif= ierFlagCommand)
> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0b=3D8;
> > +=C2=A0 =C2=A0}
> > +=C2=A0 =C2=A0[self sendmouse:b];
> >=C2=A0 }
> >=C2=A0
> >=C2=A0 - (void) mouseDown:(NSEvent*)event { [self mouseevent:event= ]; }
> >
> >
> >
>

--000000000000d9fa9505c4f5cd6c--