Handle keyboard events on specific scene

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):

JavaScript:
Scene.somekeyhandlerthatIcouldnotfound = function(keyCode) {
      switch (keyCode) {
      case 33:    // pageup
          // do something
      case 40:    // down arrow
          // do something else
      }
      return false;
  };

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 🙂.
The SceneManager runs the update method of the active scene every frame. Typically, scene-specific inputs/responses are part of that update routine. E.g. this is where the map scene checks the input each frame to see if the player has opened the menu:
Spoiler: Relevant excerpts (rpg_scenes.js)
JavaScript:
Scene_Map.prototype.update = function() {
    this.updateDestination();
    this.updateMainMultiply();
    if (this.isSceneChangeOk()) {
        this.updateScene();   // <- A
    } else if (SceneManager.isNextScene(Scene_Battle)) {
        this.updateEncounterEffect();
    }
    this.updateWaitCount();
    Scene_Base.prototype.update.call(this);
};

Scene_Map.prototype.updateScene = function() {
    this.checkGameover();
    if (!SceneManager.isSceneChanging()) {
        this.updateTransferPlayer();
    }
    if (!SceneManager.isSceneChanging()) {
        this.updateEncounter();
    }
    if (!SceneManager.isSceneChanging()) {
        this.updateCallMenu();   // <- B
    }
    if (!SceneManager.isSceneChanging()) {
        this.updateCallDebug();
    }
};

Scene_Map.prototype.updateCallMenu = function() {
    if (this.isMenuEnabled()) {
        if (this.isMenuCalled()) {   // <- C
            this.menuCalling = true;
        }
        if (this.menuCalling && !$gamePlayer.isMoving()) {
            this.callMenu();
        }
    } else {
        this.menuCalling = false;
    }
};

Scene_Map.prototype.isMenuCalled = function() {
    return Input.isTriggered('menu') || TouchInput.isCancelled();
};
So you could write your own little "check for custom inputs" method and call that in your scene's update method, e.g.
Spoiler: Possible setup
JavaScript:
Scene_Custom.prototype.update = function() {
  // stuff?
  this.updateInput();
  // other stuff?
};

Scene_Custom.prototype.updateInput = function() {
  // cf Input definitions in rpg_core.js, including keyMapper property
  if (Input.isPressed('pageup')) {
    // do something
  } else if (Input.isPressed('down')) {
    // do something else
  }
};

Original thread: https://forums.rpgmakerweb.com/threads/handle-keyboard-events-on-specific-scene.124160/