aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
diff options
context:
space:
mode:
authorXiao-Yong <jinxiaoyong@gmail.com>2018-11-13 22:57:56 -0600
committerRuss Cox <rsc@golang.org>2018-11-13 23:57:56 -0500
commita9e66ffa4eb61a4728d536d20f916a5a02ab5626 (patch)
tree241d0fc439838ab256f2fbe533ddc80bbac56a67 /src/cmd/devdraw
parent931c5906118e4db3419bfb4dced833902eb14139 (diff)
downloadplan9port-a9e66ffa4eb61a4728d536d20f916a5a02ab5626.tar.gz
plan9port-a9e66ffa4eb61a4728d536d20f916a5a02ab5626.tar.bz2
plan9port-a9e66ffa4eb61a4728d536d20f916a5a02ab5626.zip
devdraw: make ctrl generate 1-click while mouse down (#119)
This makes 2-1 chords possible with touchpad on a mac laptop.
Diffstat (limited to 'src/cmd/devdraw')
-rw-r--r--src/cmd/devdraw/cocoa-screen.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
index e7296e44..16053eaa 100644
--- a/src/cmd/devdraw/cocoa-screen.m
+++ b/src/cmd/devdraw/cocoa-screen.m
@@ -927,6 +927,8 @@ getkeyboard(NSEvent *e)
case NSFlagsChanged:
if(in.mbuttons || in.kbuttons){
in.kbuttons = 0;
+ if(m & NSControlKeyMask)
+ in.kbuttons |= 1;
if(m & NSAlternateKeyMask)
in.kbuttons |= 2;
if(m & NSCommandKeyMask)