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).
This commit is contained in:
Russ Cox
2024-06-15 10:55:21 -04:00
parent 60ca2be037
commit 0c79c32675
14 changed files with 270 additions and 100 deletions

View File

@@ -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];
}