Caps Lock not detected by UserInputService

[code] words = {[“G”] = 162245215}

local caps, shift = false, false
local service = game:GetService(“UserInputService”)

special_keys = function(keycode)
	codes = {[Enum.KeyCode.CapsLock] = function() 
	caps = not caps 
	end, 
	[Enum.KeyCode.LeftShift] = function() 
	shift = not shift 
	end, 
	[Enum.KeyCode.RightShift] = function() 
	shift = not shift	
	end}
	for i, v in next, codes do
		if keycode == i then
			v()
			print("Shift: "..tostring(shift), "Caps: "..tostring(caps))
		end
	end
end

service.InputBegan:connect(function(obj)
print(obj.KeyCode)
if not (obj.KeyCode == Enum.KeyCode.Unknown) then
print(obj.KeyCode)
special_keys(obj.KeyCode)
end
end)
[/code]

As you can see caps isn’t detected at all.

However, if I am correct KeyDown does, it maybe a haxxy method, but I tend to use a mix of KeyDown and InputBegan for typing and other relevant situations.

It works perfectly fine for me. Both began and ended fires. I didn’t try online, so maybe that’s the fault.

Weird it isn’t working for me. Maybe I have a bad version of roblox.