slide.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:Dictionary 作者: HuberTRoy 项目源码 文件源码
def handleEvents(self, args):
        if isinstance(args, MouseEvent):
            if args.current_key == 'LButton' and args.event_type == 'key down':
                self.mouseX = args.mouse_x
                self.mouseY = args.mouse_y
                self.xAndY = win32api.GetCursorPos()

            if args.current_key == 'LButton' and args.event_type == 'key up':
                if self.mouseX != args.mouse_x or self.mouseY != args.mouse_y:
                    keyboard.press_and_release('ctrl+c')

        # if isinstance(args, KeyboardEvent):
        #     if 'control' in args.current_key and args.event_type == 'key down':
        #         self.ctrlDown = True
        #     if 'control' in args.current_key and args.event_type == 'key up':
        #         self.ctrlDown = False

        #     if args.current_key == 'C' and self.ctrlDown:
        #         if self.sysCopy:
        #             pass
        #         else:
        #             self.allowCopy = True


# down = False

# def handleEvents(args):
#     global down
#     if isinstance(args, MouseEvent):
#         if args.current_key == 'LButton' and args.event_type == 'key up':
#             keyboard.press_and_release('ctrl+c')

#     if isinstance(args, KeyboardEvent):
#         if 'control' in args.current_key and args.event_type == 'key down':
#             down = True
#         if 'control' in args.current_key and args.event_type == 'key up':
#             down = False

#         if args.current_key == 'C' and down:
#             print(1)

# def onClipboardChanged()
#     data = clipboard.mimeData()
#     if data.hasText():
#         print(data.text())

# app = QApplication([])
# clipboard = app.clipboard()
# clipboard.dataChanged.connect(onClipboardChanged)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号