cancel
Showing results for 
Search instead for 
Did you mean: 

I do not know how to choose the suitable shortcut/combination in SAPUI5.

mahmood_hammood
Participant
0 Kudos

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>

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Dinu
Contributor

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)

 

mahmood_hammood
Participant
0 Kudos

@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.