Search results

KeyboardCommand API in JavaScript PDF Viewer API control

Defines a command and a key gesture to define when the command should be executed.

Properties

gesture

KeyGestureModel

Defines a combination of keys and key modifiers, on recognition of which the command will be executed.

<div id='pdfViewer'></div>
let pdfViewer: PdfViewer = new PdfViewer({
...
commandManager:{
commands:[{
name:'customCopy',
gesture:{
key:Keys.G, keyModifiers:KeyModifiers.Shift | KeyModifiers.Alt
}
}]
},
...
});
pdfViewer.appendTo('#pdfViewer');

Defaults to {}

name

string

Defines the name of the command.

Defaults to