How do you detect pressing F in Studio plugin? (how do you get a pre-existing Plugin Action?)

I’m working on a plugin that replaces Studio’s default camera movement with some custom movement.
There’s a really convenient studio feature where you can select a model and press F on your keyboard to teleport your camera to that model.

That feature uses Studio’s PluginAction feature.
image

I know how to create a PluginAction
https://developer.roblox.com/en-us/api-reference/function/Plugin/CreatePluginAction
but how do I grab one that already exists?

Also, before someone mentions this, you’re not really supposed to use UserInputService for Plugins. UserInputService requires you to have the World View tab focused. Plus, even if you do use UserInputService, Roblox has it so that PluginActions take priority and override UserInputService events, so pressing F won’t even show up.


Just noticing it now but PluginActions you create don’t even seem to show up on the list of shortcuts.
Is this a bug?

I wish you could just create a PluginAction with a table of default Enum.KeyCodes
:frowning_face:
Also, why can’t you have multiple PluginActions have the same Shortcut?
It’s kinda annoying.

1 Like

I don’t believe the f keybind is a plugin action, might be wrong
I thought userinputservice worked with plugins? (might be wrong again)

As long as you know how to do the zoom to function then using user input service should be easy

As you can see by the screenshots, the F keybind is a Plugin Action.

UserInputService is clunky with plugins.
If you focus on any window, other than the 3D world viewing window, it won’t fire UserInputService events.

Plus, even if I was ok with that little stipulation, any shortcuts registered to a PluginAction will also not fire through UserInputService.

This seems like something the Roblox engineering team should improve.

it might have a specific name, not something like “F” or “ZoomTo” so maybe try to find something a little less simple to find? I have no idea, all I know is they probably hid it behind some pre-key (ex: “Built-In_ZoomTo” or something crazy like that


If you look closer at the image, it’s literally the first thing on the list :kissing: