how to implement shortcut key for mendix application using (keyboard shortcut) widget

0
dear experts,    I have a situation where I am not able to implement the shortcut key,  below screen shot try to implement save functionality using enter button how can we do this any idea?
asked
1 answers
1

You can use html snippet & jquery to do that. 

You will need to define a class to your input label as below.

image.png

 

After that you need to add HTMLSnippet and configure your jquery code. 

image.png

 

You can use mendix api to call microflows inside js etc.  You can find the example javascript below.

$(".inputlabel").keyup(function(event) {
    if (event.keyCode === 13) {
   
  mx.data.action({
   params: {
    actionname: "Playground.ACT_LogIt"
   },
   origin: this.mxform,
   callback: function(obj) {
    // no MxObject expected
    alert("Just petted the cat a little");
   },
   error: function(error) {
    alert(error.message);
   },
   onValidation: function(validations) {
    alert("There were " + validation.length + " validation errors");
   }
  });

        
    }
});

I hope that helps.

answered