PageUp and PageDown improperly moving the camera when testing game in studio

Reproduction Steps

  1. Run this in LocalScript:
local ContextActionService = game:GetService("ContextActionService")

local function Action(actionName, inputState, inputObject)
	print(actionName)
end

ContextActionService:BindAction("Up", Action, true, Enum.KeyCode.PageUp)
ContextActionService:BindAction("Down", Action, true, Enum.KeyCode.PageDown)
  1. Pressing PageUp and PageDown will fire the ContextActionService:BindAction and at the same time will move the camera focus up and down.
  2. Publish and play outside Studio. It will work correctly, ie, the camera will not move.

Expected Behavior
The camera should not move when pressing PageUp and PageDown keys

Actual Behavior
Only in Studio, the camera is moving when pressing PageUp and PageDown keys

Issue Area: Studio
Issue Type: Other
Impact: Moderate
Frequency: Constantly

Edit

Also, in Studio, PageUp and PageDown will generate only Enum.UserInputState.End and never Enum.UserInputState.Begin

Try toggling this setting:

Thanks, but here I’m reporting a bug, not asking for an workaround.

It’s not a bug as this is intended, also my ‘workaround’ is not a workaround but the fix to the ‘bug’.

Well, I think the Roblox staff is able to judge this.

Adding onto this, the comma and period keys also move the camera (and like the post says, only in studio)

@Abcreator has the right solution here, you need to disable that setting.

I have to disagree, because a few months ago these keys were normally captured by Studio and now they aren’t anymore.
And disabling this option will impact other shortcut keys that were used by windows and other support programs I use, like Autohotkey.
Disabling is not the fix, it’s the workaround.

However since this is an intentional change, it is therefore not a bug and is probably better suited as a #feature-requests

Roblox doesn’t have to support third-party programs.

Again, let the Roblox staff judge that.

Did you use BindAction or BindActionAtPriority at that point? You can try the latter and see if a sufficiently high priority and then sinking the input avoids the camera movement.

In my old project, about 6 months ago, I only used UserInputService.InputBegan and it was working.

local UserInputService 	= game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(Input,GPE)
	print (Input.KeyCode)	
end)

I stopped the project and recently started another one with the same UserInputService system.
To my surprise, these problems started to happen.

So I tried to migrate to ContextActionService:BindAction and I realized that the same happens, which is why I opened this bug ticket, because it used to work, today it doesn’t.

This isn’t really a bug either? Studio has a specific bindable action for tilting the camera up and down that’s binded to the PageUp and PageDown keys so as intended the camera will be tilted if you press those keys in Studio. The action doesn’t exist on the client and therefore doesn’t do it outside of Studio.

If you’ve disabled the respect Studio shortcut setting and you still find the camera tilts in some cases, then provided you don’t actively use these keys to tilt the camera or anything you can just remove the PageUp and PageDown keys from the binding list so it won’t be actionable.

File → Advanced → Customize Shortcuts → Search for Tilt → Double click the box in the Shortcut column → Right click → Hit Clear Shortcut

You can always restore Studio shortcuts to their defaults or rebind the keys at a later point in time if for whatever reason you’re not comfortable massively changing your Studio bindings and you need a way to revert some but not all bindings.

For third party program concerns, the answer is just to not use keys that conflict with their bindings, change the bindings for that program or your Roblox system or be mindful of what keys another user might have reserved for other tooling. Perhaps you may want to consider adding in a modifiable binding for your experience’s settings too.

2 Likes

In addition to solving this problem, you discovered the cause of this anomaly, being in fact a single keyboard shortcut introduced in some Studio version that probably occurred a few months ago.
Thank you again.

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