Skip to content

Commit

Permalink
Don't open Chat if using Slash as a modifier key for something else
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Nov 17, 2019
1 parent 1d8fcc2 commit 1ab2cbd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Themes/_fallback/BGAnimations/ScreenChatOverlay overlay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,24 @@ function MPinput(event)
end
end

if event.type == "InputEventType_FirstPress" and event.DeviceInput.button == "DeviceButton_/" then
shouldOpen = true
end

if shouldOpen and event.type == "InputEventType_FirstPress" and event.DeviceInput.button ~= "DeviceButton_/" then
shouldOpen = false
end

if not typing and event.type == "InputEventType_Release" then -- keys for auto turning on chat if not already on -mina
if event.DeviceInput.button == "DeviceButton_/" then
if event.DeviceInput.button == "DeviceButton_/" and shouldOpen then
typing = true
update = true
if minimised then
minimised = not minimised
MESSAGEMAN:Broadcast("Minimise")
end
typingText = "/"
shouldOpen = false
end
end

Expand Down

0 comments on commit 1ab2cbd

Please sign in to comment.