Make F11 toggle fullscreen (in addition to F4)

orlando

Veteran
Veteran
Joined
May 24, 2014
Messages
177
Reaction score
84
F11 is a common key choice to toggle fullscreen state in many non-game programs, and also recently in various modern games.


RPG Maker MV's default of F4 seems a bit obscure to me.


Therefore, this small snippet adds F11 as additional toggle key for fullscreen (F4 remains functional!).

Code:
// Bind fullscreen toggle to F11 (in addition to F4)
// by orlando
// Date: 06/01/2016

//=============================================================================


/*:
 * @plugindesc Binds fullscreen toggling to F11 in addition to the default F4
 * @author orlando
 * @license Common, this snippet is absolutely trivial :) you could have thought of it yourself! I don't care what you do with it, do anything you want.
 */

Graphics._prePatchF11Down_onKeyDown =
    Graphics._onKeyDown;
Graphics._onKeyDown = function(event) {
    if (!event.ctrlKey && !event.altKey) {
        switch (event.keyCode) {
        case 122:   // F11
            event.preventDefault();
            this._switchFullScreen();
            return;
        }
    }
    return this._prePatchF11Down_onKeyDown(event);
};
 

KaYsEr

Koruldia
Veteran
Joined
Mar 14, 2014
Messages
227
Reaction score
455
First Language
French
Primarily Uses
RMMV
Good idea.


And why not adding the good old "ALT+ENTER" too, I think many players would still try it.
 

Edsephiroth

Edsephiroth
Member
Joined
Feb 10, 2014
Messages
17
Reaction score
3
First Language
Portuguese
Primarily Uses
N/A
ALT+ENTER is a good idea.


Simple, but amazing script.
 

Wes Lesley

Veteran
Veteran
Joined
Nov 25, 2016
Messages
76
Reaction score
5
First Language
Dutch
Primarily Uses
is there a way to make a Main Menu button that toggles fullscreen on/off? :)  pweeze?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Managed to find a way to hang a bed cover over my window. So no more being toasted alive in the afternoon!:kaoswt2:
So, uh, has anyone tried buying any resources from KokoroReflections? Because I've been looking for a 'buy' button on the site for like 10 minutes now and can't find one.
Any also thought it's too cringy to put the word "and you" in your credit as a special thanks?
Cause that's what I thought...
Everyone in the US right now: Please stay safe.
Symphony Celestia: Prophecy of the Falling Stars RPG Maker music pack WIP. Symphony Celestia is a new series that focuses on symphonic and orchestrated music to tell a story. Each story will include compositions that make up that story from beginning to end. Themes include: Battles, adventures, character themes, etc. Below is a video preview to the first story.

Forum statistics

Threads
97,980
Messages
948,320
Members
129,243
Latest member
SoloJou
Top