Created
January 27, 2016 02:32
-
-
Save harryworld/fa580aeaf52509768e7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ShiftClickGestureRecognizer.swift | |
// | |
// Created by Harry Ng on 27/1/2016. | |
// Copyright © 2016 STAY REAL. All rights reserved. | |
// | |
import Cocoa | |
class ShiftClickGestureRecognizer: NSClickGestureRecognizer { | |
override init(target: AnyObject, action: Selector) { | |
super.init(target: target, action: action) | |
} | |
required init?(coder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
override func mouseDown(event: NSEvent) { | |
if (event.modifierFlags.rawValue & NSEventModifierFlags.ShiftKeyMask.rawValue) == NSEventModifierFlags.ShiftKeyMask.rawValue { | |
super.mouseDown(event) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment