Disable F4,but keep F3?

Hello. As you know,pressing F4+F3 in RMMV will make a fullscreen that doesn’t stretch the game and just adds black boxes around it,and I was wondering,is it possible to change it so only pressing a single button
Will do it?
By default F4, by itself, toggles fullscreen mode on/off. F3 toggles stretch mode:
  • Stretch = game fills its window (or the screen if in fullscreen mode);
  • No stretch = game aspect ratio is maintained with black borders.
F3 might have no effect for you, e.g. if your system is set to always maintain an application's aspect ratio. I don't see a good reason to disable it for all potential players. 😴

If you still want to make F3 do the same as F4 then this might work (save as .js, import as plugin):
Spoiler: plugin code
JavaScript:
/*:
 * @plugindesc F3 now toggles fullscreen like F4.
 * @help Free to use and/or modify for any purpose, no credit needed.
 */
(function(alias) {
  Graphics._onKeyDown = function(event) {
    if (event.keyCode === 114 && !event.ctrlKey && !event.altKey) {
      event.preventDefault();
      this._switchFullScreen();
    } else
      alias.apply(this, arguments);
  };
})(Graphics._onKeyDown);

Original thread: https://forums.rpgmakerweb.com/threads/disable-f4-but-keep-f3.149439/