hammerspoon2-docs
    Preparing search index...

    Function setLayout

    • Switches the active keyboard layout to the one with the given localized name. Use layouts() to enumerate valid names.

      Parameters

      • layoutName: string

        The localized name of the layout to activate (e.g. "U.S.").

      Returns boolean

      true if the layout was found and selected, false otherwise.