Hi,
Is there any way to disable all the keyboard shortcut available for webviewer? (I know if i disable specific UI tools, it will disable all the shortcut available for that tools. I want to know is there any common way to disable all the shortcut available for all the tools.)
Hi there,
Thanks for contacting WebViewer forums,
Here is the list of all hotkeys available for the WebViewer UI:
https://docs.apryse.com/api/web/UI.Hotkeys.html
To disable them, you can do something like this:
const { UI } = instance;
const hotkeys = [ 'A', 'C', 'E', 'F', 'I', 'L', 'N', 'O', 'T', 'S', 'G', 'K', 'U' ];
hotkeys.forEach((key) => {
console.log('turning off key: ', key)
instance.UI.hotkeys.off(key)
});
Best regards,
Kevin Kim
Hi,
Lets say i am disabling zoom tool.
instance.UI.disableTools([instance.Core.Tools.Tool.MarqueeZoomTool]);
Now if i click A
which is a hotkey and associated with arrow tool, it should have enabled arrow tool and create arrow. But it isn’t happening. So what happened is that if i disable one tool, it will disable all hot keys associated with other tool as well.
Webviewer version: 10.2.3
Is it intended?
Hi there,
Thank you for your response,
This looks like a bug and will be added to our backlog for our product team to review. Please keep an eye out for our change-logs for the fix: Apryse Documentation | Documentation
Best regards,
Kevin Kim
Hi,
According to the documentation, tool names should be passed in for the ‘disableTools’ API. You can use the code below instead:
instance.UI.disableTools([instance.Core.Tools.ToolNames.MARQUEE]);
Thanks.
Wanbo