- Joined
- Jul 17, 2020
- Messages
- 1
- Reaction score
- 1
- First Language
- Russian
- Primarily Uses
- RMMV
Hello all,
New to RPGMMV and to plugin development, however have some basic experience with JS. Is there a way of implementing keyboard events on specific scene (e.g. one that I will create in plugin). I found SceneBase.addListener in the API but it seems that it only allows to add mouse/joystick event handlers. In my case, I want to rebind keyboard action, but do it only in a context of a specific scene. Something like this (in pseudocode):
Sorry for may be stupid question and thanks in advance!
Updated: just to clarify, I'm aware of remapping Input._onKeyDown in rpg.core.js, just wanted to find more elegant way to do it
.
New to RPGMMV and to plugin development, however have some basic experience with JS. Is there a way of implementing keyboard events on specific scene (e.g. one that I will create in plugin). I found SceneBase.addListener in the API but it seems that it only allows to add mouse/joystick event handlers. In my case, I want to rebind keyboard action, but do it only in a context of a specific scene. Something like this (in pseudocode):
JavaScript:
Scene.somekeyhandlerthatIcouldnotfound = function(keyCode) {
switch (keyCode) {
case 33: // pageup
// do something
case 40: // down arrow
// do something else
}
return false;
};
Updated: just to clarify, I'm aware of remapping Input._onKeyDown in rpg.core.js, just wanted to find more elegant way to do it
Last edited:

