hammerspoon2-docs
    Preparing search index...

    Function setSourceID

    • Switches the active input source to the one with the given reverse-DNS identifier. Use currentSourceID() to see the current value.

      Parameters

      • sourceID: string

        The input source ID to activate (e.g. "com.apple.keylayout.British").

      Returns boolean

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