I and O keys not registering in InputBegan

My code is just this.

uis.InputBegan:Connect(function(Inputobject)
       local key = Inputobject.KeyCode.Name
       print(key)
end)

And the I and O keys arent registering at all.
Please help.

I dont think this is a bug i think its just something with roblox but i need a way around it.

I and O are for zooming the camera

1 Like

Yes i know but i need to register input for those keys.

Do you mean they dont zoom when you press them or do you want to change their function?

i want to change their function

Maybe try disabling them and then putting a function to them

how would i disable them? also happy new year lol

I don’t know if this will help, but I just searched the forums and found this post:
<Disabling specific movement keys - #2 by Kampfkarren

I and O are bound at the highest priority level and the inputs are sank IIRC. So, you have to unbind them or disable binding them in the first place.

If you are creating a camera system the easiest way is simply to name two scripts CameraScript and then put it in StarterPlayerScripts.

1 Like

Do you know how to unbind the I and O keys specifically? The link that was sent didn’t provide enough information.

It’s relatively easy once you understand where to look.

  1. First open up your game and play it as a player.
  2. Then head to your developer console and look for action bindings

In there you will see a list of all the player default bound actions.

From here you can take two different routes of disabling them.

One is to call the method
ContextActionService:UnbindAction (actionName)
Second is to replace the default scripts. Simply insert a localscript into StarterPlayerScriptsnd call it CameraScript. That will disable ALL default camera functions so we can create our own.

Alternatively just use different keys. It’s not essential to unbind the keys unless they original keys are interfering with your camera system or do not work.

Finally you could simply call the

ContextActionService: BindActiomAtPriority along with the higher priority level than the normal one. The normal priority levels are usually 1000 or 2000

I’m also having issues with this and I can’t seem to get it to work. When a player gets to a certain area a gui with a local script is put into the player to handle the gui. This is part of the code in the local script.

It seems the Roblox bound zoom for I and O no longer work. But it doesn’t register that I and O are being pressed for InputBegan unless you’re holding down the Shift key.

Is this my midnight inability to comprehend or what? Lol.


local UserInputService = game:GetService("UserInputService")

game:GetService("ContextActionService"):UnbindAction("RbxCameraKeypress")


UserInputService.InputBegan:Connect(function(input, gameProcessed) -- InputBegan does not work for key I and O (zoom??)
	if input.UserInputType == Enum.UserInputType.Keyboard then
		print (input.KeyCode.Name.." BEGAN")
    end
end)

If you are not planning on having your character moving, which probably is not your plan, I found a simple solution where I put a text box off screen and put a local script inside it containing the code:

script.Parent:CaptureFocus()
script.Parent.FocusLost:Connect(function()
	script.Parent:CaptureFocus()
end)

No idea why I am replying the dead topic but I haven’t seen reply marked as solution

local contex = game:GetService('ContextActionService')
repeat task.wait() until contex:GetBoundActionInfo('RbxCameraKeypress') ~= {}
print(contex:GetBoundActionInfo('RbxCameraKeypress'))
contex:UnbindAction('RbxCameraKeypress')
print(contex:GetBoundActionInfo('RbxCameraKeypress'))