【问题标题】:Virtual Key Media Stop not working in Windows 11 - VK_MEDIA_STOP (0xB2) Python虚拟键媒体停止在 Windows 11 中不起作用 - VK_MEDIA_STOP (0xB2) Python
【发布时间】:2021-12-13 06:44:34
【问题描述】:
import win32api

win32api.keybd_event(0xB2, 0)

此代码将成功停止任何媒体播放,无论是 Windows 10 上的 chrome 还是 windows 媒体播放器等,但在更新到 Windows 11 后它不再有效。我在 3 台不同的 Windows 11 计算机上进行了尝试,但我遇到了同样的问题。如果我将虚拟键更改为 microsoft 虚拟键列表 (https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) 中的其他值,例如 VK_MEDIA_PLAY_PAUSE 0xB3 播放/暂停媒体键,它可以在 Windows 11 中使用。

微软是否在 Windows 11 中针对此功能进行了某些更改?

【问题讨论】:

    标签: python winapi pywin32


    【解决方案1】:

    目前 Windows 11 似乎不支持停止媒体键。甚至我键盘上的那个也不再起作用了。媒体播放器也缺少停止按钮。鉴于 Windows 11 仍处于早期阶段,它可能会重新实现,所以只有时间会证明一切。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-08-05
      • 2014-11-21
      • 1970-01-01
      • 2011-05-15
      • 2023-02-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多