MV Tie buttons to scroll wheel?

I want to tie Page Up and Page Down when going up and down in the scroll wheel. But I haven't find a way to do so. Does anyone know how to do this?
Find this section in rpg_core.js
80399716-353C-4EB4-9E60-101C16D3C80F.jpeg

Save all that as a plugin, copy the highlighted lines and past them back in. The numbers on the left represent the actual input. The ‘text’ represents the in game function. Change the numbers on the left to the numbers that represent the mouse wheel up and down buttons.

You’ll have to look up what those are.

Edit: seeing as there are no mouse inputs in that list, I’m not certain that it will work for mouse buttons. You’ll have to experiment a bit or maybe someone more knowledgeable can say. If not then the solution should be somewhere else in rpg_core.js
Find this section in rpg_core.js
View attachment 182848
Save all that as a plugin, copy the highlighted lines and past them back in. The numbers on the left represent the actual input. The ‘text’ represents the in game function. Change the numbers on the left to the numbers that represent the mouse wheel up and down buttons.

You’ll have to look up what those are.

Edit: seeing as there are no mouse inputs in that list, I’m not certain that it will work for mouse buttons. You’ll have to experiment a bit or maybe someone more knowledgeable can say. If not then the solution should be somewhere else in rpg_core.js
I thought that but doesn't seem to have keycodes for the mouse.
Or I'm just dumb and I can't find them. I'll take another look anyways, thanks!
You might have to do a bit of guessing and testing.
Find this section in rpg_core.js
View attachment 182848
Save all that as a plugin, copy the highlighted lines and past them back in. The numbers on the left represent the actual input. The ‘text’ represents the in game function. Change the numbers on the left to the numbers that represent the mouse wheel up and down buttons.

You’ll have to look up what those are.

Edit: seeing as there are no mouse inputs in that list, I’m not certain that it will work for mouse buttons. You’ll have to experiment a bit or maybe someone more knowledgeable can say. If not then the solution should be somewhere else in rpg_core.js
mousewheel is coded inside TouchInput (also in rpg_core.js)
Code:
TouchInput._onWheel = function(event) {
    this._events.wheelX += event.deltaX;
    this._events.wheelY += event.deltaY;
    event.preventDefault();
};
now we need the code to detect it's mouse wheel up or mouse wheel down and forcing input pageup or pagedown...
Moved to: Plugin Requests
mousewheel is coded inside TouchInput (also in rpg_core.js)
Code:
TouchInput._onWheel = function(event) {
    this._events.wheelX += event.deltaX;
    this._events.wheelY += event.deltaY;
    event.preventDefault();
};
now we need the code to detect it's mouse wheel up or mouse wheel down and forcing input pageup or pagedown...
Nice. I’ll see if I can crack that when I have time.
Nice. I’ll see if I can crack that when I have time.
Thank you! I tried to make it work but Im new at java script so I just couldn't do it.

Original thread: https://forums.rpgmakerweb.com/threads/tie-buttons-to-scroll-wheel.134394/