@vertigis/viewer-spec
Version:
VertiGIS Viewer Specification
42 lines (41 loc) • 1.13 kB
TypeScript
import type { ConsoleKeyInfo } from "../DotNetTypes.js";
import type { Event } from "../Event.js";
import { EventRegistry } from "../EventRegistry.js";
import type { Message } from "../Message.js";
export declare class ShortcutEvents extends EventRegistry {
protected readonly _prefix = "shortcut";
/**
* Raised when a shortcut was added. Mobile only.
*
* @mobileOnly
*/
get shortcutAdded(): Event<AddShortcutArgs>;
/**
* Raised when a shortcut was removed. Mobile only.
*
* @mobileOnly
*/
get shortcutRemoved(): Event<ShortcutArgs>;
}
/**
* The arguments for keyboard shortcut events.
*/
export interface ShortcutArgs {
/**
* The key combination this shortcut uses.
*/
key: ConsoleKeyInfo;
}
/**
* The arguments for the "shortcut.added" event.
*/
export interface AddShortcutArgs extends ShortcutArgs {
/**
* The command or operation assigned to the corresponding shortcut.
*/
operation: Message;
/**
* Indicates whether the map must be focused for the message to be executed.
*/
requiresMapFocus: boolean;
}