diff options
author | Xiao-Yong <jinxiaoyong@gmail.com> | 2018-11-13 22:57:56 -0600 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2018-11-13 23:57:56 -0500 |
commit | a9e66ffa4eb61a4728d536d20f916a5a02ab5626 (patch) | |
tree | 241d0fc439838ab256f2fbe533ddc80bbac56a67 /src/cmd/devdraw | |
parent | 931c5906118e4db3419bfb4dced833902eb14139 (diff) | |
download | plan9port-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.m | 2 |
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) |