[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.