Javascript key code for Mouse Click

Hi! I'm aware of this site: https://www.toptal.com/developers/keycode to get the key code for the button pressed. I am using this to write code like this to map keys:

Input.keyMapper[17] = "swapskillleft"; // L1
Input.keyMapper[18] = "swapskillright"; // R1
etc...

When using my PS5 controller, it seems my R2 is mapped to left click, and my L2 is mapped to right click. How would I Input.keyMapper for Left and Right click? When I used the website above, it won't register the clicks.

Thank you!
Mouse event and key event are two different things. It seem mv uses touch logic for mouse.
(Check TouchInput class in rpg_core instead of Input)
Maybe this helps you:

Code:
Input.gamepadMapper[17] = 'swapskillleft';
Mouse event and key event are two different things.
Key presses and gamepad button presses are also two different things 😉

The OP is mixing them all together.

The keyMapper is for keys - on the keyboard.

The mouse is TouchInput.

The gamepad is gamepadMapper.

Original thread: https://forums.rpgmakerweb.com/threads/javascript-key-code-for-mouse-click.169909/