Place a HTML/JS snippet with the following code on the signin page and replace with your own classes:
(function() {
document.addEventListener("keydown", function(e) {
if (e.keyCode !== 13) return; // ignore if the pressed key is not 'Enter' key.
var inputField = document.querySelector(".myPasswordInput input");
var btn = document.querySelector(".mySubmitButton");
if (inputField && btn && document.activeElement === inputField) {
btn.click();
}
});
});
Hi Peter,
As Sjors mentioned, you can add a HTML/JS snippet to your page. There are also widgets available that you can use for this and perhaps also for other hotkeys, e.g. Mendix Marketplace - Keyboard Shortcut
Hope this helps!
Hi Peter,
Use the html snippet in your login page with below code and configure the login/sign-in button class name as follows:
Hope it will resolve your query.
I understand that with custom javascript you can get this job done.
However, I am not happy with that.. The more custom javascript, the harder to maintain your apps.
I have submitted an idea on the forum: https://forum.mendix.com/link/ideas/3473.
Please give it an upvote if you also think this should be included
Hi Peter,
Within the properties pane of the wiget you can set the onEnter event.
Hope this will help.
Jan