See Chris’answer at question 94697:
“I think this is what you’re looking for: https://appstore.home.mendix.com/link/app/78474/
Or maybe this one: https://appstore.home.mendix.com/link/app/21721/”
HTMLSnippet + https://stackoverflow.com/questions/14707602/capturing-f5-keypress-event-in-javascript-using-window-event-keycode-in-window-o/37742202 … boom
One thing you could try is the Exit Intent widget. This will show a message if a user tries to re-load or leave a page with unsaved data.
https://appstore.home.mendix.com/link/app/21721/Mendix/Exit-Intent-(Wait-Don't-Go)