I'm in a company that is upgrading from Crm2011 to Dynamics 365. Our current solution rely heavily on using shortcuts, which is a very important requirement from our users.
We are experiencing problems with adding shortcuts in Dynamics 365 using the Mousetrap-api (https://craig.is/killing/mice) and have tried other api's as well without succes
The shortcuts are added onformload like this, and we are seing the messages "Adding shortcuts" and "Adding shortcuts - done" in the console, but none of the shortcut seems to work
function OnCrmFormLoad(ctx) { console.log("Adding shortcuts"); Mousetrap.Add('5', function() {console.log('5'); }); Mousetrap.Add('ctrl k', function() {console.log('ctrl k'); }); console.log("Adding shortcuts - done"); }
Are custom keyboard shortcuts not supported in Dynamic 365? or is there another way to add custom keyboard shortcuts?
I think Microsoft Edge will help you for this. Or visit 10kbeasts for keyboards related queries
So we finally managed to find a solution.
It appeared that the problem was that clientscript is embedded in an iframe in D365, so the eventlisteners was added to this frame instead of the actual D365 form. By setting the target of the event to the parent of the iframe we managed to solve the problem
Thanks for your reply. I'm using Chrome, but have tried Edge as well - same result with both browsers.
I was able to debug Mousetrap.Add (which is actually called Mousetrap.bind - typo :-)). I was able to step all the way through without any inner exceptions. Seems like D365 is "eating" all mousetrap-events - if I replicate the same code in a simple html-page everything works fine
Which browser you are using? Is it logging any exception to the browser window. Can you debug the Mousetrap.Add function and see if there are any inner exception.
Good Luck
Best Regards
PG
Thanks - but this is not what I asked for. We are well aware of the standard keyboard shortcuts in D365, but they don't cover our needs
Hi,
Here are the list of shortcuts for D365.
https://docs.microsoft.com/en-us/powerapps/user/keyboard-shortcuts
Hope this helps
Best Regards
PG
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156