SheetXL - v0.3.20
    Preparing search index...

    A command group is a collection of commands and child command groups.

    interface IGroup {
        activate(key?: string): void;
        addCommands(
            commands: readonly ICommand<any, any>[],
            replace?: boolean,
        ): void;
        addListener(
            listener: IListener,
            options?: IListenerOptions,
        ): RemoveListener;
        createChildGroup(
            target: ITarget | (() => ITarget),
            groupKey: string,
            replace?: boolean,
        ): IGroup;
        dispatchToFocusedCommand(e: KeyboardEvent): boolean;
        findCommandByEvent(e: KeyboardEvent): ICommand<any, void>;
        getActive(): IGroup;
        getAllCommands(): { command: ICommand<any, any>; groupKey: string }[];
        getCommand(key: string): ICommand<any, any>;
        getGroup(key: string): IGroup;
        getKey(): string;
        getParent(): IGroup;
        getRoot(): IGroup;
        removeFromParent(): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Methods

    • Set the command group to the 'focused group.

      Parameters

      • Optionalkey: string

        The key of the group to activate. If not provided then the current group is activated.

      Returns void

    • Add a collection of commands to the group.

      Parameters

      • commands: readonly ICommand<any, any>[]

        The commands to add.

      • Optionalreplace: boolean

        If true replace the existing commands. If false ignores duplicates. If unspecified a warning will be logged for duplicates.

      Returns void

      Set the commands for the current node.

    • Add listener.

      Parameters

      • listener: IListener
      • Optionaloptions: IListenerOptions

      Returns RemoveListener

    • Create a new map to add Commands.

      Parameters

      • target: ITarget | (() => ITarget)
      • groupKey: string

        String description describing the reason for the group. This is presented to the user in the shortcut UI.

      • Optionalreplace: boolean

        If true replace the existing commands. If false ignores duplicates. If unspecified a warning will be logged for duplicates.

      Returns IGroup

    • Parameters

      • e: KeyboardEvent

        The keyboard event to dispatch

      Returns boolean

    • Return a command that matched the keyboard event or null if no command was found.

      Parameters

      • e: KeyboardEvent

        The keyboard event.

      Returns ICommand<any, void>

    • Return the active group.

      Returns IGroup

      This is the group that the dispatch will start from.

    • Returns a list of all commands in the group and all children commands.

      Returns { command: ICommand<any, any>; groupKey: string }[]

      This does not return parent commands.

    • Return a command that matches the key.

      Parameters

      • key: string

      Returns ICommand<any, any>

      Search both the current and any child commands groups that are actives.

    • Returns a group for the given when string.

      Parameters

      • key: string

      Returns IGroup

    • Returns the keys associated with the group

      Returns string

    • Returns the parent command group.

      Returns IGroup

      If root then will return return itself.

    • Returns the top most commands group.

      Returns IGroup

      If root then will return return itself.

    • Remove the command group from the parent.

      Returns void

      If this is the root this operation will have no effect