Issues with the keymapper

I'm playing with a games code for personal use and one of the changes I wanted to make was to make the movement wasd, but when I went in and switched the keymapping around, it ignores the new w is up and treats it like it's still page down, even though I changed that to e. Is there somewhere else I need to look to change controls?

Here's the keymap after I changed it.
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', // A
87: 'up', // W
68: 'right', // D
83: 'down', // S
45: 'escape', // insert
81: 'pageup', // Q
69: 'pagedown', // E
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
};
By itself, that looks like it should work. However...

If you have a plugin that modifies the keymapper, that can erase any direct edits you make to the core scripts, since plugins load after the core scripts. Or you might accidentally have edited the wrong project's core scripts (it's harder to accidentally import a plugin into the wrong project).

Plugins can be turned on/off easily (e.g. for testing), ported to other projects, and can have their load order easily adjusted. Editing the core script files directly just makes things unnecessarily difficult.

Try saving this as a .js file (paste into a text editor, then File -> Save As -> File Types: All Files, Filename: whatever.js), then import it as a plugin:
JavaScript:
/*:
 * @target MV MZ
 * @plugindesc Changes the keyMapper (keyboard input).
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/164154/
 * @help Free to use and/or modify for any project, no credit required.
 */
Object.assign(Input.keyMapper, {
  65: 'left',    // A
  87: 'up',      // W
  68: 'right',   // D
  83: 'down',    // S
  69: 'pagedown' // E
});
This simply adds the WASD keys and remaps W -> E: arrow keys will still work as usual. Did a quick test (MV) and it works for me~

Edit - and if for some reason you wanted to remove a mapping, you could do that like this:
JavaScript:
delete Input.keyMapper[37];  // arrow left
Thank you for your reply. It didn't end up working, but I figured out that one of the plugins was being activated later than the others and forcibly overwriting the inputs. I've dealt with it.
Ah, some plugins do that, e.g. YEP_ButtonCommonEvents. Regardless, good to hear you solved it!

Original thread: https://forums.rpgmakerweb.com/threads/issues-with-the-keymapper.164154/