I am looking for a way to change the normal arrow keys to the w a s d keys. Is there a way I can do that?
MV How to change the movement keys?
JS Plugin RequestsJust use something like this https://dk-plugins.ru/full-input/ and change the up, down, left, and right key to w a s d.
If you wanted to just outright replace the function of the arrow keys with W A S D and wanted something more lightweight, this short plugin should do it for you:
It'll outright remove the ability to use the arrow keys at all and simply remaps them to the WASD keys, accordingly.
Keep in mind that, by default, "pagedown" is normally mapped to W, so this code will overwrite that.
If you want something more configurable, I'd suggest the above-linked plugin from @rexie09.
JavaScript:
/*:
* @plugindesc Remaps the arrow keys to the WASD keys.
* @author Zevia
*
* @help This plugin simply remaps the arrow keys to the WASD keys. It is not
* configurable and was written to handle a specific user's request on the
* RPGMakerWeb forums.
*
* Note that W is, by default, the pagedown key, but will become unusable with this
* code.
*/
(function(module) {
'use strict';
module.Zevia = module.Zevia || {};
module.Zevia.originalKeyMapper = Object.keys(Input.keyMapper).reduce(function(keyMap, key) {
keyMap[key] = Input.keyMapper[key];
return keyMap;
}, {});
['37', '38', '39', '40'].forEach(function(keyCode) {
delete Input.keyMapper[keyCode];
});
[
{ keyCode: 87, command: 'up' }, // W
{ keyCode: 65, command: 'left' }, // A
{ keyCode: 83, command: 'down' }, // S
{ keyCode: 68, command: 'right' } // D
].forEach(function(button) {
Input.keyMapper[button.keyCode] = button.command;
});
})(window);
It'll outright remove the ability to use the arrow keys at all and simply remaps them to the WASD keys, accordingly.
Keep in mind that, by default, "pagedown" is normally mapped to W, so this code will overwrite that.
If you want something more configurable, I'd suggest the above-linked plugin from @rexie09.
Moved to: Plugin Requests
Thank you for this !!
Original thread: https://forums.rpgmakerweb.com/threads/how-to-change-the-movement-keys.135580/