ONLYOFFICE / sdkjs-plugins

The add-ons for ONLYOFFICE Document Server and ONLYOFFICE Desktop Editors.
https://www.onlyoffice.com
Apache License 2.0
136 stars 134 forks source link

Unable to add keyboard listening event #153

Open WarmSally opened 3 years ago

WarmSally commented 3 years ago

Excuse me, I want to add the monitoring of keyboard function keys to formulate some special behaviors, but I can't find the corresponding API on the official website.I want to ask if the existing API supports listening for keyboard events

WarmSally commented 3 years ago

For example, I want to listen for the Enter key,I tried two ways the first,I use the API provided by the official website to monitor character input,

window.Asc.plugin.event_onInputHelperInput = function(data){
}

the second,I use the ‘document.addEventListener’ to monitor keyboard pressed events; But neither method worked

ShockwaveNN commented 3 years ago

@askonev Please take a look

bxja commented 3 years ago

I also encountered the same problem, please help to solve it

askonev commented 3 years ago

@WarmSally @bxja

Unfortunately, this functionality does not exist at the moment, but I started an enhancement bug №49548 to add these methods. Thank you for your idea and for improving the ONLYOFFICE project.

WarmSally commented 3 years ago

Thanks for your help