KeymapManager
Constructors
new KeymapManager()
new KeymapManager(
editor
):KeymapManager
Parameters
• editor: Editor
Returns
Source
Properties
editor
editor:
Editor
Source
keymap
keymap:
KeyMap
Source
Methods
add()
add(
keys
):void
Add keymaps
Parameters
• keys: KeyMap
Returns
void
Source
bind()
bind(
keymap
):void
Parameters
• keymap: KeyMap
Returns
void
Source
buildKeyDescriptor()
buildKeyDescriptor(
hasCmd
,hasCtrl
,hasAlt
,hasShift
,key
):string
Parameters
• hasCmd: boolean
• hasCtrl: boolean
• hasAlt: boolean
• hasShift: boolean
• key: string
Returns
string
Source
formatKeyDescriptor()
formatKeyDescriptor(
descriptor
):string
Parameters
• descriptor: string
Returns
string
Source
getKeymap()
getKeymap():
KeyMap
Get current keymap
Returns
Source
handleKey()
handleKey(
key
):boolean
Parameters
• key: string
Returns
boolean
Source
inEditMode()
inEditMode():
boolean
Returns
boolean
Source
inModalDialog()
inModalDialog():
boolean
Returns
boolean
Source
isEditKey()
isEditKey(
event
):boolean
Parameters
• event: KeyboardEvent
Returns
boolean
Source
mapKeycodeToKey()
mapKeycodeToKey(
keycodeNumber
,key
):string
Parameters
• keycodeNumber: number
• key: string
Returns
string
Source
normalizeKeyDescriptor()
normalizeKeyDescriptor(
descriptor
):string
Parameters
• descriptor: string
Returns
string
Source
translateKeyboardEvent()
translateKeyboardEvent(
event
):string
Translate key event to normalized key descriptor
Parameters
• event: KeyboardEvent
Returns
string