SAPUI5 – Enable Keyboard Shortcuts
There are scenarios wherein the UI5 app should support keyboard shortcuts to perform some actions.
Here is a template that can be used as hook to write custom logic:
In your controller file, use the below method:
Thinking about ease of use in your design! Perfect. I was just looking at a blog about bag of tricks - I'm adding this one to mine.
How can I add view as you mentioned ?? doing it on document is creating error on
because "this" is documnt here.
What if you want to extend standard short cuts?
For example in a SAP UI Table, it is possbile to select multiple rows by default by holding the ctrl key pressed (MultiToggle active).
But now I also want to add a short cut like, e.g., "ctrl + i" for inserting a row.
If I proceed in the manner you described above, the standard short cuts will not work anymore and all events are getting catched in your function and are not further propagated.
Is there a manner how to forward the events that are not handled in your custom function?