Hello AXperts,
I wanted to create an user defined keyboard shortcut, let's say if I press (ALT+ P ) it should click form custom pure button created using form extension.
I have already come across the below link but I am not sure how and where this can implemented. Can any AXperts provide an example or a pathway on how to achieve this user defined keyboard shortcut. Also is it possible only using JavaScript? How does the OOTB Keyboard shortcuts were implemented in D365FO forms, examples please.
Shortcuts: {
Save: {
Keys: { ctrl: true, keyCode: $dyn.ui.KeyCodes.letterS },
Handler: function (evt) {
var control = evt ? $dyn.context(evt.target) : undefined;
this.executeShortcuts(true, "SaveRecord", control);
},
},
New: {
Keys: { alt: true, keyCode: $dyn.ui.KeyCodes.letterN },
Handler: function (evt) {
var control = evt ? $dyn.context(evt.target) : undefined;
this.executeShortcuts(true, "NewRecord", control);
},
},
Delete: {
Keys: { alt: true, keyCode: $dyn.ui.KeyCodes.deleteKey },
Handler: function (evt) {
this.executeShortcuts(false, "DeleteRecord");
},
},
// Additional code
}
Other information:
Version : D365FO 10.0.11
Thanks Pradeep