Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 796 Bytes

VK.md

File metadata and controls

42 lines (33 loc) · 796 Bytes

Static Properties

Name Description

Methods

Name Description
registerKeyDownEventHandlers Register KeyDown Event Handlers for window

registerKeyDownEventHandlers

Parameters Type Description
handlers Array The event handlers
logKey bool True will print key if there is no matched handler
Return
The function which is used to unregister the event handler
registerKeyDownEventHandlers([
{
  keys: ['ctrl', '+'],
  handler: () => {
    console.log('new tab');
  }
},
{
  keys: ['ctrl', '-'],
  handler: () => {
    console.log('close the tab');
	 }
}
]);