Completely Disable F5?

Hi guys, i have a question. Is it possible to completely eliminate the f5 function? Many Thanks
what does the F5 function? if you can be more specific? but in other words, its possible to elimate all keybuttons you need.
@ShadowDragon: F5 refreshes/reloads the page.

@franapo0990: save this as a .js file and import it as a plugin~
Code:
(function() {
	var alias = SceneManager.onKeyDown;
	SceneManager.onKeyDown = function(event) {
		if (event.keyCode !== 116) alias.call(this, event);
	};
})();
@ShadowDragon: F5 refreshes/reloads the page.

@franapo0990: save this as a .js file and import it as a plugin~
Code:
(function() {
    var alias = SceneManager.onKeyDown;
    SceneManager.onKeyDown = function(event) {
        if (event.keyCode !== 116) alias.call(this, event);
    };
})();

oh caethyril... you are my hero! Thanks!!!
Hey there! This worked for me to disable F5- many thanks!

Is there any reason you can think of why it wouldn't work the same way for F3, with the keycode changed to 114? So far, I have had no luck. Thanks for your help!

@ShadowDragon: F5 refreshes/reloads the page.

@franapo0990: save this as a .js file and import it as a plugin~
Code:
(function() {
    var alias = SceneManager.onKeyDown;
    SceneManager.onKeyDown = function(event) {
        if (event.keyCode !== 116) alias.call(this, event);
    };
})();
2019, wow.

@AmMitch - because that method only handles F5 and F8. For F3 you'd want to patch Graphics._onKeyDown instead, e.g.
JavaScript:
(function() {
	var alias = Graphics._onKeyDown;
	Graphics._onKeyDown = function(event) {
		if (event.keyCode === 114)
			event.preventDefault();
		else
			alias.apply(this, arguments);
	};
})();

In future, please just start a new thread rather than hijacking a dead one. 👋

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/completely-disable-f5.110026/