KeyboardShortcut Class

Deprecated  in 4.15.0. Use KeyboardShortcutProps or FrameworkKeyboardShortcut instead.

Keyboard Shortcut used to execute an action

Extends

Methods

Name Description
constructor(props: KeyboardShortcutProps): KeyboardShortcut    
getShortcut(mapKey: string): undefined | KeyboardShortcut Finds a shortcut with a given key in the shortcut's container  
itemPicked(): void Called when the ActionButtonItemDef associated with this shortcut is invoked  

Inherited methods

Name Inherited from Description
setDescription(v: string | StringGetter | ConditionalStringValue): void Inherited ItemDefBase Set the description.
setLabel(v: string | StringGetter | ConditionalStringValue): void Inherited ItemDefBase Set the label.
setTooltip(v: string | StringGetter | ConditionalStringValue): void Inherited ItemDefBase Set the tooltip.
initializeDef(me: ItemDefBase, itemProps: ItemProps): void Static Inherited ItemDefBase  

Properties

Name Type Description
id Accessor ReadOnly string Returns the id for this shortcut  
isAltKeyRequired Accessor ReadOnly boolean Gets whether the Alt key required.  
isCtrlKeyRequired Accessor ReadOnly boolean Gets whether the Ctrl key required.  
isFunctionKey Accessor ReadOnly boolean Gets whether this is a Function key.  
isShiftKeyRequired Accessor ReadOnly boolean Gets whether the Shift key required.  
isSpecialKey Accessor ReadOnly boolean Gets whether this is a Special key.  
item Accessor ReadOnly undefined | ActionButtonItemDef Returns the ActionButtonItemDef associated with this shortcut  
key Accessor ReadOnly string Gets the keyboard key  
keyMapKey Accessor ReadOnly string Returns the shortcut's key map key used as the id  
shortcutContainer Accessor ReadOnly KeyboardShortcutContainer Returns the shortcut container  

Inherited properties

Name Type Inherited from Description
applicationData Inherited any | undefined ItemDefBase  
badgeKind Inherited BadgeKind | undefined ItemDefBase  
badgeType Inherited BadgeType | undefined ItemDefBase  
description Accessor Inherited ReadOnly string ItemDefBase Get the description string
iconElement Inherited React.ReactNode | undefined ItemDefBase  
iconSpec Inherited IconSpec | undefined ItemDefBase  
isActive Accessor Inherited boolean ItemDefBase  
isDisabled Inherited boolean | ConditionalBooleanValue ItemDefBase  
isHidden Inherited boolean | ConditionalBooleanValue ItemDefBase  
isPressed Inherited boolean ItemDefBase  
label Accessor Inherited ReadOnly string ItemDefBase Get the label string
rawLabel Accessor Inherited ReadOnly string | StringGetter | ConditionalStringValue ItemDefBase Get the label string
tooltip Accessor Inherited ReadOnly string ItemDefBase Get the tooltip string
trayId Accessor Inherited ReadOnly undefined ItemDefBase  

Defined in

Last Updated: 30 January, 2025