-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Games under Wayland/SDL receive keyboard events when mouse focus changes in and out #1198
Comments
用 WAYLAND_DEBUG=1 启动你说的这些程序和 fcitx5 看看 顺便推荐你试试 kde 或者更新 sway 到 1.10 看看 |
感谢回复,更新sway到1.10仍然有此问题。 加上WAYLAND_DEBUG=1启动后,完整日志见wayland.txt 移入鼠标时的片段:
移出鼠标时的片段:
关闭fcitx5,解决此问题后的日志如下。 移入鼠标时的片段:
移出鼠标时的片段:
|
这么看感觉是sdl的bug,keyboad leave 之后不应该假定任何按键的状态 sway也没有产生新的 wl keyboad key wl_keyboard@30.modifiers(1378, 0, 0, 0, 0) 也清空了modifier key的状态 |
Duplicate of #1202 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
以窗口模式运行 Moonlight(串流软件)和 Factorio(异星工厂)时,在鼠标移动或在游戏和其他窗口之间切换焦点时,游戏窗口获得焦点时会产生 Ctrl、Alt、Shift 键的按下事件,表现为游戏认为这些键被长按。当游戏窗口失去焦点时,则会产生这些键的弹起事件。
在 Ctrl、Alt、Shift 中,哪些键会被触发没有发现规律,但 Ctrl 的频率最高,Alt 和 Shift 很少出现。
运行
killall fcitx5
或者卸载 fcitx5,可以解决这一问题。故障演示视频如下。
record.mp4
Steps to Reproduce
Expected Behavior
正确时的SDL事件:
移入鼠标,SDL程序获得焦点:
移出鼠标,SDL程序失去焦点:
错误时的SDL事件:
移入鼠标,SDL程序获得焦点,并认为Ctrl键按下:
移出鼠标,SDL程序失去焦点,并认为Ctrl键弹起:
Output of fcitx5-diagnose command
fcitx5-diagnose.log
The text was updated successfully, but these errors were encountered: