Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Lite版本问题反馈 #218

Closed
zrq0058 opened this issue Mar 7, 2024 · 1 comment
Closed

Lite版本问题反馈 #218

zrq0058 opened this issue Mar 7, 2024 · 1 comment

Comments

@zrq0058
Copy link

zrq0058 commented Mar 7, 2024

长按右键有时会闪下背包界面而且有时会把steam游戏内界面打开
steam游戏内界面打开这个问题可以通过修改快捷键解决
闪背包折腾好几天实在是无解

@kiccer
Copy link
Owner

kiccer commented Mar 11, 2024

闪背包的代码在这里。lite版本是通过鼠标的移动来动态调整下压幅度的,但是当鼠标处于屏幕底部时,获取的位置就不会发生改变,就失去了动态调整的能力,所以收枪的时候需要通过开背包的方式,将鼠标位置重置到屏幕中心。(暂时没有更好的解法,这个是权宜之计)

-- 右键长按 300ms 以上,认定为开镜了,放开右键后,按下 tab 两次,重置鼠标位置
if event == "MOUSE_BUTTON_PRESSED" and arg == 3 and family == "mouse" then
RunningCache.rightMouseDownTimestamp = GetRunningTime()
end
if event == "MOUSE_BUTTON_RELEASED" and arg == 3 and family == "mouse" then
-- 右键按下时长
local rightMouseDownDuration = GetRunningTime() - RunningCache.rightMouseDownTimestamp
-- ConsoleLog({ "右键按下时长: ", rightMouseDownDuration, "ms" })
-- 重置鼠标位置
if (rightMouseDownDuration >= 300 and not IsPressed(1)) then
PressAndReleaseKey('tab')
PressAndReleaseKey('tab')
end
end

@kiccer kiccer closed this as completed Jun 2, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants