Skip to main content

Some functions that don’t appear in the menu cannot have shortcuts assigned to them. However, I came up with an alternative method. By using the keyboard shortcut Command+K, you can bring up the search box. Once the required function is entered, you can activate it. Then, on macOS, you can use a script to help automate this workflow and trigger it with a single click. Below is the script I wrote for quickly creating multiple components.

tell application "System Events" 
    -- Activate the Figma application
    tell application "Figma" to activate 
    
    -- Simulate the Command + K keyboard shortcut
    keystroke "k" using {command down} 
    delay 0.1 -- Wait for the command panel to appear 
    
    -- Type "创建多个组件" (Create Multiple Components)
    set the clipboard to "Create Multiple Components" -- Use the clipboard to ensure proper Chinese input 
    delay 0.1 -- Ensure clipboard content is set properly 
    keystroke "v" using {command down} -- Paste the clipboard content 
    
    -- Press the Enter key
    delay 0.1 -- Wait for the input to complete
    keystroke return 
end tell

Then, use automation settings to bind the script to a keyboard shortcut or a Touch Bar button, and you’re good to go.

However, I still hope that the official developers can adapt these shortcuts, or at the very least provide a function entry in the system menu to make it easier for users to set shortcuts using third-party tools.

Be the first to reply!