How to disable the keyboard shortcut key

WebViewer Version:11.2.0

Do you have an issue with a specific file(s)?
Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server?
Does the issue only happen on certain browsers?
Is your issue related to a front-end framework? yes
Is your issue related to annotations?

Please give a brief summary of your issue:
(Think of this as an email subject)
When I type in the password field that I created in my frontend, other features of the PDF WebViewer are triggered. For example, when I enter a password and type any key, pressing ā€œSā€ enables the signature feature, and pressing ā€œUā€ enables the underline feature. However, I want to prevent these shortcut keys from being activated while typing the password. Instead, I want interactions to be handled only through the mouse to avoid any disruptions while entering a password.

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

Please provide a link to a minimal sample where the issue is reproducible:

1 Like

https://sdk.apryse.com/api/web/UI.Hotkeys.html#main

1 Like

Hi there,

While you are entering the password in the password prompt, it would only enter your keyboard inputs into the input field and hotkeys should not be triggered.

If you want to disable hotkeys, 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

1 Like