V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
iMath
V2EX  ›  Python

我的开源项目 WindowsKeyboardHook:用 Python 注册 Windows 系统级的全局快捷键

  •  1
     
  •   iMath · 2020-12-21 16:47:15 +08:00 · 1012 次点击
    这是一个创建于 1211 天前的主题,其中的信息可能已经有所发展或是发生改变。
    https://github.com/redstoneleo/WindowsKeyboardHook

    目前依赖于 PyQt5 QThread, 欢迎把它改成 Python 的 threading.Thread,把这个项目纯 Python 化!
    第 1 条附言  ·  2020-12-23 08:04:56 +08:00
    已经改成 Python 的 threading.Thread 了
    ysc3839
        1
    ysc3839  
       2020-12-21 16:56:16 +08:00 via Android
    不明白为什么要起一个新线程去执行函数,你说会卡死怀疑是死锁了。
    以及最下面的消息循环完全是错的,难道不会出现处理完一个消息后就退出的问题?
    iMath
        2
    iMath  
    OP
       2020-12-21 17:00:16 +08:00
    @ysc3839 起一个新线程去执行函数 是为了防止在 GUI 程序里出现界面卡顿的情况

    “以及最下面的消息循环完全是错的,难道不会出现处理完一个消息后就退出的问题?” 根据我的测试并没有出现这种情况。你觉得错在哪里?求解释说明
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4163 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 04:13 · PVG 12:13 · LAX 21:13 · JFK 00:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.