Cindering
(Cindering)
January 20, 2017, 5:44am
#1
This also happens when pressing numbers while the Esc menu is open. I assume it’s some issue relating to how the tool-equipping input is being processed.
1 Like
Looks like a regression in the behavior of the UserInputService.TextBoxFocused event.
We will investigate. (cc @spotco )
See here:
-- Init HotkeyStrings, used for eating hotkeys
for i = 0, 9 do
table.insert(HotkeyStrings, tostring(i))
end
table.insert(HotkeyStrings, ARROW_HOTKEY_STRING)
-- Listen to key down
UserInputService.InputBegan:connect(OnInputBegan)
-- Listen to ANY TextBox gaining or losing focus, for disabling all hotkeys
UserInputService.TextBoxFocused:connect(function() TextBoxFocused = true end)
UserInputService.TextBoxFocusReleased:connect(function() TextBoxFocused = false end)
-- Manual unequip for HopperBins on drop button pressed
HotkeyFns[DROP_HOTKEY_VALUE] = function() --NOTE: HopperBin
if ActiveHopper then
UnequipAllTools()
end
end
-- Listen to keyboard status, for showing/hiding hotkey labels
This bug is compounded by the fact that the isProcessed bool isn’t used at all in the backpack script. Not sure why this is.
Backpack = Player:WaitForChild('Backpack')
table.insert(CharConns, Backpack.ChildRemoved:connect(OnChildRemoved))
table.insert(CharConns, Backpack.ChildAdded:connect(OnChildAdded))
for _, child in pairs(Backpack:GetChildren()) do
OnChildAdded(child)
end
AdjustHotbarFrames()
end
local function OnInputBegan(input, isProcessed)
-- Pass through keyboard hotkeys when not typing into a TextBox and not disabled (except for the Drop key)
if input.UserInputType == Enum.UserInputType.Keyboard and not TextBoxFocused and (WholeThingEnabled or input.KeyCode.Value == DROP_HOTKEY_VALUE) then
local hotkeyBehavior = HotkeyFns[input.KeyCode.Value]
if hotkeyBehavior then
hotkeyBehavior(isProcessed)
end
end
end
local function OnUISChanged(property)
1 Like
This should be fixed now, can you restart studio and make sure the issue is fixed for you?
2 Likes
system
(system)
Closed
October 25, 2022, 8:30pm
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.