UserInputService not reflecting Keypad inputs properly (SHIFT and KeypadPeriod)

UserInputService does not properly detect the presence of the SHIFT key upon the pressing of any Keypad button (CTRL and ALT are properly detected).

In addition, KeypadPeriod (KeyCode = 266) registers keypresses properly in Studio, but does not in an real game.

It is unknown how long this bug has existed.
The bug happens for Windows 10 but may also extend to other OS (untested).

Reproduction:

SHIFT not detected: Paste the following code into a LocalScript and place it in StarterPlayerScripts:

UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(function(Input,GPE)
	if Input.UserInputType == Enum.UserInputType.Keyboard then
		local KeyValue = Input.KeyCode.Value
		if (KeyValue >= 256 and KeyValue <= 272) then
			print("detected a keypad input")
			print(Input:IsModifierKeyDown(0) or UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift))
			if Input:IsModifierKeyDown(0) or UserInputService:IsKeyDown(Enum.KeyCode.LeftShift) or UserInputService:IsKeyDown(Enum.KeyCode.RightShift) then
				print("shift was detected")
			end
		end
	end
end)

Holding SHIFT and pressing any keypad key in Studio or in-game will show that SHIFT is not being detected.

KeypadPeriod not detected: Paste the following code into a LocalScript and place it in StarterPlayerScripts, then upload the place as a game:

UserInputService = game:GetService("UserInputService")

UserInputService.InputBegan:Connect(function(Input,GPE)
	if Input.UserInputType == Enum.UserInputType.Keyboard then
		local KeyValue = Input.KeyCode.Value
		if (KeyValue == 266) then
			print("pressed KeypadPeriod")
		end
	end
end)

Pressing KeypadPeriod in Studio testing will detect the keypress as expected; however, it will not be detected in a real game.
bugreport.rbxl (18.3 KB)

2 Likes

Thanks for your report! This appears to be some difference in how we control input in studio vs the windows client for playing games, we will investigate and fix this.

1 Like

I am in the process of checking over bug reports and following up on some bugs that haven’t received any activity in a while.
Is this issue still occurring or can you confirm that this bug has been resolved?

2 Likes

Yes, this still happens.

Is there any update on when this issue will get resolved?
This issue is still happening as of now.

any update? it is still an issue

Still happening
Please fix this it’s really messing up my test enviornment

This is still occurring three years later.
I have further details to add to this.
Numpad * - and + function correctly.
Numpad / and . in studio produce their correct keycodes, however ingame the divide keycode produces backslash’s keycode, and the decimal point keycode sends the delete keycode.

This seems to occur on both US qwerty, UK qwerty keyboard layouts.

1 Like