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

This makes 2-1 chords possible with touchpad on a mac laptop.
This commit is contained in:
Xiao-Yong 2018-11-13 22:57:56 -06:00 committed by Russ Cox
parent 931c590611
commit a9e66ffa4e

View file

@ -927,6 +927,8 @@ getkeyboard(NSEvent *e)
case NSFlagsChanged: case NSFlagsChanged:
if(in.mbuttons || in.kbuttons){ if(in.mbuttons || in.kbuttons){
in.kbuttons = 0; in.kbuttons = 0;
if(m & NSControlKeyMask)
in.kbuttons |= 1;
if(m & NSAlternateKeyMask) if(m & NSAlternateKeyMask)
in.kbuttons |= 2; in.kbuttons |= 2;
if(m & NSCommandKeyMask) if(m & NSCommandKeyMask)