def SimKeyCallback(self, codes, info): if codes == "": self.EndLastEvent() else: shouldBlock = HasActiveHandler("SimKey." + codes) self.TriggerEnduringEvent(codes) return shouldBlock
def KeyboardCallback(self, codes, num, lastNum): if codes == "": self.EndLastEvent() else: if num >= lastNum: self.TriggerEnduringEvent(codes) else: self.EndLastEvent() return HasActiveHandler("Keyboard." + codes)
def SimKeyCallback(self, codes, info): if codes == "": self.EndLastEvent() else: keys = set(codes.split("+")).difference(modKeys) if len(keys) == 0: #All keys are modifiers return False shouldBlock = HasActiveHandler("SimKey." + codes) self.TriggerEnduringEvent(codes) return shouldBlock
def MouseCallBack(self, buttonName, buttonNum, param): if param: if self.lastMouseEvent: self.lastMouseEvent.SetShouldEnd() shouldBlock = HasActiveHandler("Mouse." + buttonName) self.mouseButtonWasBlocked[buttonNum] = shouldBlock self.lastMouseEvent = self.TriggerEnduringEvent(buttonName) return shouldBlock else: if self.lastMouseEvent: self.lastMouseEvent.SetShouldEnd() return self.mouseButtonWasBlocked[buttonNum] return False