wip ui keyboard shortcuts plugin
RobloxStudioBeta_Pub2qggTtP.mp4
either download the plugin file from the latest release and copy it to your studio plugins folder, or build it from source with npm and rojo.
- clone the repo and cd into the directory
git clone https://github.com/unrooot/studiomacros && cd studiomacros
- install dependencies with npm (node.js required)
npm i
- build the plugin with rojo
rojo build --plugin StudioMacros.rbxm
in Roblox Studio, go to File -> Advanced -> Customize Shortcuts and bind
"StudioMacros Commands" to a key (e.g. Shift+Space
), then select an instance
and press the shortcut to open the command palette.
Up
andDown
to navigate the command palette (orCtrl+J
andCtrl+K
on macOS)Enter
to run the selected commandShift+Enter
to run the selected command without closing the command paletteEsc
to close the command palette (or clear the search)Ctrl+D
to toggle descriptions on the macros in the listShift+Escape
to release focus from the command paletteTab
andShift+Tab
to cycle through custom result inputs (currently only implemented in the color picker)
roblox studio plugins currently do not have a good way of handling input and focus (see here) so the plugin will not work if the viewport in studio is not focused. this means if you select an instance in the explorer, and try to use the command palette, despite the UI opening and the textbox being focused, you won't be able to type. you can work around this by right clicking the viewport to move your camera without deselecting the current instance before opening the command palette.
you will need to build the plugin to add new macros. create a new file in any
folder inside of src/StudioMacros/macros
with the following structure:
return {
Name = "Macro Name",
Description = "A description of the macro",
-- optional values, when provided the macro will use the custom results to
-- select arguments which will be passed to the macro. see:
-- ChangeBackgroundColor.luau or ChangeFont.luau for an example
CustomResults = "Color" | "Font" | "FontStyle",
TargetProperty = "BackgroundColor3",
-- optional predicate function that should return true if the macro should
-- work + be available for the given instance
Predicate = function(instance)
return instance:IsA("BasePart")
end;
Macro = function(instance)
instance.Position = Vector3.zero
instance.Size = Vector3.one
-- optionally return an instance (or table of instances) that will be
-- selected after the macro is run
return instance
end;
}
to create a group of macros, create a new folder inside of the macros folder,
and create a file called GroupData.luau
with the following structure:
return {
Name = "Group Name";
Icon = "rbxassetid://1234567";
}
if you're actively creating and testing new macros, you can run rojo build
with the --watch
flag to automatically rebuild the plugin when you save a
file (this requires "Plugin Debugging Enabled" setting to be enabled in
studio).