From 0c79c32675e83ff3d87d5bf52082652d85486a45 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 15 Jun 2024 10:55:21 -0400 Subject: acme: shift button 3 for reverse search An experiment. Let's see if it's any good. Also document the Mac conventions in devdraw(3). --- src/cmd/devdraw/mac-screen.m | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/cmd/devdraw') diff --git a/src/cmd/devdraw/mac-screen.m b/src/cmd/devdraw/mac-screen.m index f07054cf..04c807b7 100644 --- a/src/cmd/devdraw/mac-screen.m +++ b/src/cmd/devdraw/mac-screen.m @@ -631,12 +631,17 @@ rpc_resizewindow(Client *c, Rectangle r) b = [NSEvent pressedMouseButtons]; b = (b&~6) | (b&4)>>1 | (b&2)<<1; if(b){ + int x; + x = 0; if(m & ~omod & NSEventModifierFlagControl) - b |= 1; + x = 1; if(m & ~omod & NSEventModifierFlagOption) - b |= 2; + x = 2; if(m & ~omod & NSEventModifierFlagCommand) - b |= 4; + x = 4; + if(m & NSEventModifierFlagShift) + x <<= 5; + b |= x; [self sendmouse:b]; }else if(m & ~omod & NSEventModifierFlagOption) gfx_keystroke(self.client, Kalt); @@ -701,6 +706,8 @@ rpc_resizewindow(Client *c, Rectangle r) }else if(m & NSEventModifierFlagCommand) b = 4; + if(m & NSEventModifierFlagShift) + b <<= 5; } [self sendmouse:b]; } -- cgit v1.2.3