MV How i can remove F2 and F3?

Hi guys i wanna remove the function of the fps with F2 and the other effect on screen with F3.
I search on web and on this forum and i remove F5 with this
:


(function() {
var alias = SceneManager.onKeyDown;
SceneManager.onKeyDown = function(event) {
if (event.keyCode !== 113) alias.call(this, event);
};

})();


But if i modify the event key code it dosen't delete the f2 or f3, so i try another plugin called AS_InputSetting



* @plugindesc WASD Movement, Disable F keys and Disable mouse/touch input.
*
* @Author Astra Cat
*
* @param WASD Control
* @desc Use WASD to move character?
* @Default false
* @param Disable F2 F3 and F4
* @desc Disable F2, F3, and F4 keys?
* @Default false
* @param Disable Gamepad
* @desc Disable gamepad input
* @Default false
* @param Disable Mouse
* @desc Disable mouse input
* @Default false
* @param Disable Mouse Move
* @desc Disable player moving through mouse click or touch input.
* @Default false
* @Help Simple input settings plugin.

*/

/* global PluginManager, Input */
var parameters = PluginManager.parameters('AS_InputSettings');
var WASDcontrol = String(parameters['WASD Control'] || 'false');
var DisableF2F3F4 = String(parameters['Disable F2 F3 and F4'] || 'false');
var NoGamepad = String(parameters['Disable Gamepad'] || 'false');
var MouseDisabled = String(parameters['Disable Mouse'] || 'false');
var MouseDisabledCharMapMovement = String(parameters['Disable Mouse to Move Character on Map'] || 'false');


if (MouseDisabledCharMapMovement == 'true'){
var alias_AstraCat_processMapTouch = Scene_Map.prototype.processMapTouch;
Scene_Map.prototype.processMapTouch = function() {
alias_AstraCat_processMapTouch.call();

if (TouchInput.isTriggered() || this._touchCount > 0) {
if (TouchInput.isPressed()) {
if (this._touchCount === 0 || this._touchCount >= 15) {
//var x = $gameMap.canvasToMapX(TouchInput.x);
//var y = $gameMap.canvasToMapY(TouchInput.y);
//$gameTemp.setDestination(x, y);
}
this._touchCount++;
} else {
this._touchCount = 0;
}
}
};
}

//Disable F2, F3, and F4
if (DisableF2F3F4 == 'true') {
Graphics._onKeyDown = function(event) {
if (!event.ctrlKey && !event.altKey) {
switch (event.keyCode) {
case 113: // F2
event.preventDefault();
break;
case 114: // F3
event.preventDefault();
break;
case 115: // F4
event.preventDefault();
break;
}
}
};
}
else if (DisableF2F3F4 == 'false') {
Graphics._onKeyDown = function(event) {
if (!event.ctrlKey && !event.altKey) {
switch (event.keyCode) {
case 113: // F2
event.preventDefault();
this._switchFPSMeter();
break;
case 114: // F3
event.preventDefault();
this._switchStretchMode();
break;
case 115: // F4
event.preventDefault();
this._switchFullScreen();
break;
}
}
};
}

if (WASDcontrol == 'true') {
Input.keyMapper =
{
9: 'tab', // tab
13: 'ok', // enter
16: 'shift', // shift
17: 'control', // control
18: 'control', // alt
27: 'escape', // escape
32: 'ok', // space
33: 'pageup', // pageup
34: 'pagedown', // pagedown
65: 'left', // left arrow
87: 'up', // up arrow
68: 'right', // right arrow
83: 'down', // down arrow
45: 'escape', // insert
81: 'pageup', // Q
82: 'pagedown', // W
88: 'escape', // X
90: 'ok', // Z
96: 'escape', // numpad 0
98: 'down', // numpad 2
100: 'left', // numpad 4
102: 'right', // numpad 6
104: 'up', // numpad 8
120: 'debug' // F9
}
}
else if (WASDcontrol == 'false')
{
Input.keyMapper =
{
9: 'tab', // tab
13: 'ok', // enter
16: 'shift', // shift
17: 'control', // control
18: 'control', // alt
27: 'escape', // escape
32: 'ok', // space
33: 'pageup', // pageup
34: 'pagedown', // pagedown
37: 'left', // left arrow
38: 'up', // up arrow
39: 'right', // right arrow
40: 'down', // down arrow
45: 'escape', // insert
81: 'pageup', // Q
87: 'pagedown', // W
88: 'escape', // X
90: 'ok', // Z
96: 'escape', // numpad 0
98: 'down', // numpad 2
100: 'left', // numpad 4
102: 'right', // numpad 6
104: 'up', // numpad 8
120: 'debug' // F9
};
}


if (NoGamepad == 'false') {
//No gamepad
Input.gamepadMapper = {
0: 'ok', // A
1: 'cancel', // B
2: 'shift', // X
3: 'menu', // Y
4: 'pageup', // LB
5: 'pagedown', // RB
12: 'up', // D-pad up
13: 'down', // D-pad down
14: 'left', // D-pad left
15: 'right', // D-pad right
};
}
else if (NoGamepad == 'true') {
//Map the gamepad to some random useless key for none-use
Input.gamepadMapper = {
222: 'ok', // A
222: 'cancel', // B
222: 'shift', // X
222: 'menu', // Y
222: 'pageup', // LB
222: 'pagedown', // RB
222: 'up', // D-pad up
222: 'down', // D-pad down
222: 'left', // D-pad left
222: 'right', // D-pad right
};
}

if (MouseDisabled == 'true') {
TouchInput.initialize = function() {
this.clear();
};
}
else if (MouseDisabled == 'false') {
TouchInput.initialize = function() {
this.clear();
this._setupEventHandlers();
};
}


But it remove not only f2 and f3 but f4 too.
I try to modify this plugin deleting the f4 line but nothing.
Did you know how to remove f2 and f3? By modify one of these plugin or in other ways? Thanks you very much!
PS: SORRY GUYS if someone tried to use the AS_InputSettings it was broken by me XD now i post the original one
Here, have this:
Code:
(function(){
Graphics._onKeyDown = function(event) {
    
    if (!event.ctrlKey && !event.altKey) {
    switch (event.keyCode) {                
        case 113: /* F2 */
            return;
            break;
        case 114: /* F3 */
            return;
            break;
        break;
        case 115: /* F4 */
            return;
            break;
        case 116: /* F5 */
            return;
            break;            
        }
    }
};
})();

(function() {
    var alias = SceneManager.onKeyDown;
    SceneManager.onKeyDown = function(event) {
        if (event.keyCode !== 116) alias.call(this, event);
    };
})();
Thanks very much!
Did you ever find a way to disable F3 without also disabling F4? Thanks!!


Hi guys i wanna remove the function of the fps with F2 and the other effect on screen with F3.
I search on web and on this forum and i remove F5 with this
:


(function() {
var alias = SceneManager.onKeyDown;
SceneManager.onKeyDown = function(event) {
if (event.keyCode !== 113) alias.call(this, event);
};

})();


But if i modify the event key code it dosen't delete the f2 or f3, so i try another plugin called AS_InputSetting



* @plugindesc WASD Movement, Disable F keys and Disable mouse/touch input.
*
* @Author Astra Cat
*
* @param WASD Control
* @desc Use WASD to move character?
* @Default false
* @param Disable F2 F3 and F4
* @desc Disable F2, F3, and F4 keys?
* @Default false
* @param Disable Gamepad
* @desc Disable gamepad input
* @Default false
* @param Disable Mouse
* @desc Disable mouse input
* @Default false
* @param Disable Mouse Move
* @desc Disable player moving through mouse click or touch input.
* @Default false
* @Help Simple input settings plugin.

*/

/* global PluginManager, Input */
var parameters = PluginManager.parameters('AS_InputSettings');
var WASDcontrol = String(parameters['WASD Control'] || 'false');
var DisableF2F3F4 = String(parameters['Disable F2 F3 and F4'] || 'false');
var NoGamepad = String(parameters['Disable Gamepad'] || 'false');
var MouseDisabled = String(parameters['Disable Mouse'] || 'false');
var MouseDisabledCharMapMovement = String(parameters['Disable Mouse to Move Character on Map'] || 'false');


if (MouseDisabledCharMapMovement == 'true'){
var alias_AstraCat_processMapTouch = Scene_Map.prototype.processMapTouch;
Scene_Map.prototype.processMapTouch = function() {
alias_AstraCat_processMapTouch.call();

if (TouchInput.isTriggered() || this._touchCount > 0) {
if (TouchInput.isPressed()) {
if (this._touchCount === 0 || this._touchCount >= 15) {
//var x = $gameMap.canvasToMapX(TouchInput.x);
//var y = $gameMap.canvasToMapY(TouchInput.y);
//$gameTemp.setDestination(x, y);
}
this._touchCount++;
} else {
this._touchCount = 0;
}
}
};
}

//Disable F2, F3, and F4
if (DisableF2F3F4 == 'true') {
Graphics._onKeyDown = function(event) {
if (!event.ctrlKey && !event.altKey) {
switch (event.keyCode) {
case 113: // F2
event.preventDefault();
break;
case 114: // F3
event.preventDefault();
break;
case 115: // F4
event.preventDefault();
break;
}
}
};
}
else if (DisableF2F3F4 == 'false') {
Graphics._onKeyDown = function(event) {
if (!event.ctrlKey && !event.altKey) {
switch (event.keyCode) {
case 113: // F2
event.preventDefault();
this._switchFPSMeter();
break;
case 114: // F3
event.preventDefault();
this._switchStretchMode();
break;
case 115: // F4
event.preventDefault();
this._switchFullScreen();
break;
}
}
};
}

if (WASDcontrol == 'true') {
Input.keyMapper =
{
9: 'tab', // tab
13: 'ok', // enter
16: 'shift', // shift
17: 'control', // control
18: 'control', // alt
27: 'escape', // escape
32: 'ok', // space
33: 'pageup', // pageup
34: 'pagedown', // pagedown
65: 'left', // left arrow
87: 'up', // up arrow
68: 'right', // right arrow
83: 'down', // down arrow
45: 'escape', // insert
81: 'pageup', // Q
82: 'pagedown', // W
88: 'escape', // X
90: 'ok', // Z
96: 'escape', // numpad 0
98: 'down', // numpad 2
100: 'left', // numpad 4
102: 'right', // numpad 6
104: 'up', // numpad 8
120: 'debug' // F9
}
}
else if (WASDcontrol == 'false')
{
Input.keyMapper =
{
9: 'tab', // tab
13: 'ok', // enter
16: 'shift', // shift
17: 'control', // control
18: 'control', // alt
27: 'escape', // escape
32: 'ok', // space
33: 'pageup', // pageup
34: 'pagedown', // pagedown
37: 'left', // left arrow
38: 'up', // up arrow
39: 'right', // right arrow
40: 'down', // down arrow
45: 'escape', // insert
81: 'pageup', // Q
87: 'pagedown', // W
88: 'escape', // X
90: 'ok', // Z
96: 'escape', // numpad 0
98: 'down', // numpad 2
100: 'left', // numpad 4
102: 'right', // numpad 6
104: 'up', // numpad 8
120: 'debug' // F9
};
}


if (NoGamepad == 'false') {
//No gamepad
Input.gamepadMapper = {
0: 'ok', // A
1: 'cancel', // B
2: 'shift', // X
3: 'menu', // Y
4: 'pageup', // LB
5: 'pagedown', // RB
12: 'up', // D-pad up
13: 'down', // D-pad down
14: 'left', // D-pad left
15: 'right', // D-pad right
};
}
else if (NoGamepad == 'true') {
//Map the gamepad to some random useless key for none-use
Input.gamepadMapper = {
222: 'ok', // A
222: 'cancel', // B
222: 'shift', // X
222: 'menu', // Y
222: 'pageup', // LB
222: 'pagedown', // RB
222: 'up', // D-pad up
222: 'down', // D-pad down
222: 'left', // D-pad left
222: 'right', // D-pad right
};
}

if (MouseDisabled == 'true') {
TouchInput.initialize = function() {
this.clear();
};
}
else if (MouseDisabled == 'false') {
TouchInput.initialize = function() {
this.clear();
this._setupEventHandlers();
};
}


But it remove not only f2 and f3 but f4 too.
I try to modify this plugin deleting the f4 line but nothing.
Did you know how to remove f2 and f3? By modify one of these plugin or in other ways? Thanks you very much!
Necro-post notice: @AmMitch

@AmMitch I see that you left an angry react. You're absolutely welcome to request help on this! We simply request you open a new thread.

The member you are responding to has not logged on in 18 months and your use case may vary from OP's (even if only slightly). You're actually more likely to get assistance with your own thread.
Did you ever find a way to disable F3 without also disabling F4? Thanks!!
Just comment out the F4 part of the code.

Original thread: https://forums.rpgmakerweb.com/threads/how-i-can-remove-f2-and-f3.147065/