-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove "Left-click will be ignored for a short time after the focus window" #39
Comments
Closed by 4a73dd1 |
新版可灵活配置,更优雅了,但是会影响到双击行为。 |
…indow" For 4a73dd1 the #39 (comment) shows regression, and it will conflict with other scripts.
加回去了 |
我倒是有个方案,也是用
要想不影响双击的话,加个定时器,获取焦点时延迟绑定,延迟时间大概1.5倍的
暂时用着不错,估计还是有些特殊情况有冲突。 最大的缺点是可读性可维护性太差了,这里写lua代码不能换行,必须强制压为一行, |
…data/inputevent/onfocus:cycle pause}` instead
旧版的硬编码写死还是不太好,有些人可能不需要这个功能,可以试用下这个 verygoodlee/input-event@14ce642 可配置的。 获取焦点的时候写入一个 user-data属性 绑定按键使用property-expansion 语法判断一下,不存在这个属性时才执行 @natural-harmonia-gropius 如果觉得不错可以提个PR合并一下 |
我觉得就像 如果有人有实际的需要我再想怎么改。 |
我试了几个有单击暂停功能的网页播放器,获取焦点时也会暂停,不过浏览器中有较多空白区域可以获取焦点,不会刻意去点视频区域获取焦点。 |
我下载mpc-hc试了下会播放/暂停。没有必要跟从别人的行为啊,逻辑上就是点这一下会暂停很烦人。而且mpv除了顶栏就没有空白区域,就这唯一的顶栏还可以关掉,对一些用户来说是没有安全单击区域的。 |
最近在用这个原生右键菜单 https://github.com/tsl0922/mpv-menu-plugin ,也有类似的问题 tsl0922/mpv-menu-plugin#23,没有一个通用的解决方案。 |
可以的,但是和inputevent的有点冲突,inputevent的单击双击都绑定的MBTN_LEFT,直接禁用MBTN_LEFT会导致双击也失效,要完美搭配inputevent使用还是得自己改改 |
@verygoodlee 试试 https://github.com/tsl0922/mpv-menu-plugin/actions 最新版,在inputevent最后面加上这个。 mp.register_script_message('menu-close', function()
local binding = bind_map["MBTN_LEFT"]
if not binding then
return
end
binding:ignore("click", binding.duration)
end) |
是的,上次就是这么改的,可以复用一下 mp.register_script_message("menu-close", function() on_focused_update(nil, true) end) |
100ms not always well worked, states based approach should no more race issue.
https://github.com/natural-harmonia-gropius/input-event/blob/239b2fc9c7486b9874e592bb8a95408d17e3c663/inputevent.lua#L445C1-L449C5
and
https://github.com/natural-harmonia-gropius/input-event?tab=readme-ov-file#left-click-will-be-ignored-for-a-short-time-after-the-focus-window
mpv.conf
input.noleft.conf
The text was updated successfully, but these errors were encountered: