[Solved] Default keyboard keys for diagonal movement?

First of all, sorry if the title seems inappropriate. I couldn't find the right words to describe what I mean. I want the player to move diagonally with the press of the default keys. For example, pressing the up key will cause the player to move diagonally upwards to the left and down key causes the player to move diagonally downwards to the right... like in an isometric point of view. Is that even possible?
This is MV, anything is possible, including iso movement. You just need to reprogram the rpg core scripts.
@Poryg I thought so but this is still a problem for me. I don't know programming.
Where should I start and what should I modify?

*Edit* I found a solution! seriously, I'm so stupid! I should've tried a bit before making this thread. I used Yanfly's button common events and in the common events set the move route of the player. May seem simple but it serves my needs !... So... this thread can be closed.
Maybe you should start by learning some javascript 😀

But I'll help you, since it doesn't require too much.
In rpg_core there is
Code:
Input._signX = function() {
    var x = 0;

    if (this.isPressed('left')) {
        x--;
    }
    if (this.isPressed('right')) {
        x++;
    }
    return x;
};

/**
 * @static
 * @method _signY
 * @private
 */
Input._signY = function() {
    var y = 0;

    if (this.isPressed('up')) {
        y--;
    }
    if (this.isPressed('down')) {
        y++;
    }
    return y;
};
Change it to
Code:
Input._signX = function() {
    var x = 0;
    var y = 0;

    if (this.isPressed('left')) {
        x--;
        y--; // or y++ if you want to move down
    }
    if (this.isPressed('right')) {
        x++;
        y++; // or y-- if you want to move up
    }
    return x;
};

/**
 * @static
 * @method _signY
 * @private
 */
Input._signY = function() {
    var x = 0;
    var y = 0;

    if (this.isPressed('up')) {
        x++; // or x-- if you want to move left
        y--;
    }
    if (this.isPressed('down')) {
        x--; // or x++ if you want to move right
        y++;
    }
    return y;
};

Then you need to change Game_Character.prototype.processMoveCommand inside rpg_objects, swapping move straight for move diagonally so that the events have default diagonal movement. And you're good to go from there, diagonal movement completed 😀
@Poryg Thank you so much! I will try that. Didn't think it would be this easy lol.
Didn't think it would be this easy lol.
Me neither to be honest 😀 But that is because this is RMMV, everything is split into small, but easily modifiable functions.
@Poryg ;_; It doesn't work! What did I do wrong! I did just what you told me. I copied the second set of code and pasted it in place of the original. Then I changed all the moveStraight to moveDiagonally in rpg_object. :/ isn't that all?

*Edit* This only seems to work for move routes. The events that have custom move routes have changed the way they move. The player hasn't. I really appreciated your help and I'll be very happy if you can look more into this.
You did nothing wrong, I did. I didn't check properly, so the code turns out to be more complicated than what I initially thought.
These two go to rpg_core to replace the actual codes:
Code:
Input._signX = function() {
    var x = 0;

    if (this.isPressed('left')) {
        x--;
    }
    if (this.isPressed('right')) {
        x++;
    }
    if (this.isPressed('up')) {
        x++
    }
    if (this.isPressed('down')) {
        x--
    }
    return x;
};
Code:
Input._signY = function() {
    var y = 0;
    if (this.isPressed('left')) {
        y--;
    }
    if (this.isPressed('right')) {
        y++
    }
    if (this.isPressed('up')) {
        y--;
    }
    if (this.isPressed('down')) {
        y++;
    }
    return y;
};

These two go to rpg_objects to replace the present functions:
Code:
Game_Player.prototype.getInputDirection = function() {
    return Input.dir8;
};

Game_Player.prototype.executeMove = function(direction) {
    var horz = 0;
    var vert = 0;

    if (direction === 1) {
        horz = 4;
        vert = 2;
    } else if (direction === 3) {
        horz = 6;
        vert = 2;
    } else if (direction === 7) {
        horz = 4;
        vert = 8;
    } else if (direction === 9) {
        horz = 6;
        vert = 8;
    }
    this.moveDiagonally(horz, vert);
};

Note that these functions will disable mouse and touch movement, so be sure to keep this in mind.
@Poryg Thank you! 🙂 It's working now.
Lol, just tried that myself and it's awesome. Just need to figure out an ISO map layout now.

Edit: I guess that wouldn't work though, would it? If it was iso the x,y would be skewed.
@bhindi1224 The way I'm planning my map, it should work. However, if I run into any problems, I'll use the normal tilesets and doodads that I had made initially, when I still hadn't thought of making an isometric game.
It's true it's not the easiest toto build an iso map, since you're pretty much not ever going to reach half of the tiles... But making an iso movement that would reach every tile would require to break the standard grid movement, which is not the easiest thing to do with events.
Well, as I managed to implement the default diagonal movements thanks to Poryg, I made a map....
isometric.png
There are no walls and stuff, I just made it to see how the isometric maps will look. I still don't know whether to work on this or stick to the default directions...
You might want to stick to it, since it gives the game unique touch. Just remember that you can only walk on 50% of the area, so you will have to build walls accordingly.

Original thread: https://forums.rpgmakerweb.com/threads/solved-default-keyboard-keys-for-diagonal-movement.85936/