じ☆ve冰风 发表于 2026-7-25 21:01:09

Make F11 toggle fullscreen (in addition to F4)

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);
};




本贴来自国际rpgmaker官方论坛作者:orlando处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/make-f11-toggle-fullscreen-in-addition-to-f4.62725/
页: [1]
查看完整版本: Make F11 toggle fullscreen (in addition to F4)