tdevdraw: make ctrl generate 1-click while mouse down (#119) - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit a9e66ffa4eb61a4728d536d20f916a5a02ab5626
parent 931c5906118e4db3419bfb4dced833902eb14139
Author: Xiao-Yong 
Date:   Tue, 13 Nov 2018 22:57:56 -0600

devdraw: make ctrl generate 1-click while mouse down (#119)

This makes 2-1 chords possible with touchpad on a mac laptop.
Diffstat:
  M src/cmd/devdraw/cocoa-screen.m      |       2 ++

1 file changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m
t@@ -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)