As of recently, plugin actions created with CreatePluginAction
do not save their shortcut.
Setting a shortcut works just fine, but if you close studio and open it again, the shortcut is not set.
This is very annoying for my workflow, as I have my plugin action shortcut set to the F13 key (which is bound to an additional mouse button), and having to set it every time I open studio is very annoying.
I would also like to note that setting shortcuts to plugin buttons works properly, and setting plugin action shortcuts to “normal” key combos doesnt work as well. (tested with Ctrl + B as well, did not save)
Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.
This is still an issue, but I recently noticed that overwriting a local plugin clears its shortcuts too. Dont know if it also happens when updating a published plugin though.
Could you provide a video walkthrough of the ways you’re setting shortcuts that are not working to help us recreate the problem on our end? If there are any specific plugins we can try this out with too that would be helpful to know
Here is a video:
The bottom is a bit cut off (so the file size was under 10mb) but yes, I did click Ok in the original recording
This is also a local plugin, which might have something to do with it.
EDIT: This indeed only happens for local plugins.
I’m not able to repro on my end. I’ll share a video with my attempt at a simple local plugin using CreatePluginAction where I’m able to successfully set a shortcut. I noticed in your video that perhaps you’re not fully saving the shortcut value? The textbox is a little tricky where you need to click it twice to make it editable, then type the keypress you want for the shortcut, and then click ok. Maybe that’ll help save the shortcut for you?
Edit: realized your shortcut was ` and tried that too and still couldn’t repro
Okay, this is my bad for not actually making a specific repro for this, but it seems like this is an issue with my plugin specifically? I just made a new one that only creates the action, and it works as intended.
I already tried digging around in my plugin, but nothing seems out of the ordinary, except there seems to be an extra action listed in Customize Shortcuts?
The first one is the PluginButton, and third is the actual action that the plugin is creating. No idea what the middle action is supposed to be, and I cant find anywhere where it could be created either.
EDIT: Just disabled all my plugins, and cleared my local plugins folder, and yet this action is still here?
I assume that there is a name conflict with this “ghost action” and the actual action, which is why the shortcut does not save. Dont know what this is about though
It’s possible the ghost action is maybe from a previous version of your plugin that wasn’t deleted for some reason? If you’re familiar with the registry, can you try fixing it in Computer\HKEY_CURRENT_USER\SOFTWARE\Roblox\RobloxStudio\Roblox Studio Key Mapping
?
If this doesn’t work, can you send me a DM with the plugin .rbxm so I can try debugging locally?
I think I finally found it. I was unable to find the correct action in the registry you mentioned, but I instead found that adding the plugin action to the quick access toolbar adds another “ghost action” to the shortcuts. After removing it from quick access again, it seems to be completely fixed. I dont know what could have caused this unfortunately.
On another note, entry 15 in my quick access registry has the name “fileSaveAction”, but the text is “Activate Quick Actions”, which probably shouldnt happen?
So in the end, there is actually a bug here.
Just testing with a plugin like this:
local action = plugin:CreatePluginAction("Test", "Test action", "This is the actual action", "", true)
action.Triggered:Connect(function()
print("Test")
end)
Setting a shortcut to the action does save, but when you add the action to quick access, it no longer works.
(top action is quick access button, bottom action is the actual action created by the plugin. You can easily tell because of the long description)
If you set a shortcut to the actual action, it does not save, and if you set a shortcut to the quick access button, it sets the shortcut to both actions after reloading studio, which does not work.
We appreciate your help in debugging the issue. We’ve taken a close look at the reported issue but won’t be able to address it at this time given upcoming work that should resolve this problem. We appreciate your understanding and please continue using the existing work around you’ve came up with to set shortcuts for plugins added to the Quick Access menu!
1 Like