'''
trackpad_tk_bindings.py
How to use B3 with a trackpad (Mac)
Oliver W. Layton
CS251: Data Analysis and Visualization
'''


def setBindings(self):
    # B1 single finger click
    self.root.bind('<Button-1>', self.handleButton1)
    self.root.bind('<B1-Motion>', self.handleButton1Motion)

    # B2 two finger click
    self.root.bind('<Button-2>', self.handleButton2)
    self.root.bind('<B2-Motion>', self.handleButton2Motion)

    # B3 one finger click + CMD modifier
    self.root.bind('<Command-Button-1>', self.handleButton3)
    self.root.bind('<Command-B1-Motion>', self.handleButton3Motion)
