microsoft / tabster

Web Application Keyboard Navigation Tools
https://tabster.io
MIT License
118 stars 36 forks source link

Add possibility to register custom callback when key events occur in tabster #326

Open adamsamec opened 9 months ago

adamsamec commented 9 months ago

Feture request

There are scenarios when the developer wants to complement or override key events handled by tabster (such as Right arrow key press) using a custom code that is executed only under some circumstances, such as when the keyboard focus is on some specific element. This need can be resolved by introducing the possibility to register a custom callback for the key events which are handled by tabster. Then, running event.preventDefault() in such callback can block the execution of the default tabster handler.