def METHOD_NAME(self, msg, wparam, lParam):
    info = windll.user32.GetMessageExtraInfo()
    # its a touch or a pen
    if (info & PEN_OR_TOUCH_MASK) == PEN_OR_TOUCH_SIGNATURE:
        if info & PEN_EVENT_TOUCH_MASK:
            return True