on 04-01-2024 6:23 PM
Halo, I have a function"onRun", I want to create a shortcut combination for to call this function/execute it.How can I choose the suitable combination? I have been tried so many combinations but no one is working. I have other function (Export) to export a file to excel and i have the same problem.
Thank you
manifest.json file
"sap.ui5": {
"_version": "1.1.0",
"rootView": {
"viewName": "com.volkswagen.ifdb.cc.af.view.App",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.65.0",
"libs": {
"sap.m": {},
"sap.ui.core": {},
"sap.ui.layout": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"commands": {
"Run": {
"shortcut": "Ctrl+Shift+Q"
}
},
view.xml file
xmlns:core="sap.ui.core"
async="true" >
<Page showHeader="false" showFooter="false" enableScrolling="true">
<Panel id="idPanel1" class="sapUiSmallMarginTop"/>
<dependents>
<core:CommandExecution id="ce_run" command="Run" enabled="true" execute="onRun" />
</dependents>
</Page>
I would choose shortcuts to be same as what Fiori Elements define for same functionality. That way it is easier for users who might be using Fiori Elements based interfaces in other parts of the application and I can rely on SAP to have made sure that these are without any conflicts.
Fiori Elements: Keyboard Shortcuts
I don't see anything wrong in the definitions except that I would use .onRun, with .(dot) as prefix, to be on the modern side of SAPUI5 syntax. I think you need to select/have focus on an element in the view for the view to capture the shortcut.
Have you looked at: Commands - Samples - Demo Kit - SAPUI5 SDK (ondemand.com)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@DinuI chose Shift+Ctrl+E for Export but it did not work.. I made the same in this sample as you can see in my Code. What should I do?
And what can I chose as shortcut for Run.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.