UserInputService won't detect slash input

I got a custom chat system, UIS won’t detect shift+7 (a.k.a slash)

UIS.InputEnded:Connect(function(input, _gameProcessed)

	if input.KeyCode == Enum.KeyCode.Slash and not _gameProcessed then

		MessageBox:CaptureFocus()
	end
end)

Use Enum.KeyCode.BackSlash instead.

Enum.KeyCode.Slash is the `` key.

For more information, take a look at the documentation.

1 Like

How does their old default chat system work with " / " ? I can’t find it as an input.

I believe it’s Enum.KeyCode.ForwardSlash. However, I can’t find it on the documentation either, so it’s either undocumented or unsupported.

Couldn’t find, but I made an alternative which works well enough.

local ShiftDown = false

UIS.InputBegan:Connect(function(input, _gameProcessed)
	
	if input.KeyCode == Enum.KeyCode.LeftShift and not _gameProcessed then
		ShiftDown = true
	end
end)

UIS.InputEnded:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		ShiftDown = false
	end
	
	if input.KeyCode == Enum.KeyCode.Seven and ShiftDown then
		MessageBox:CaptureFocus()
	end
end)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.