MV (Solved) Pre-title keymapping only partially working?

Hey there! I don't know if this is the correct category, but I put it here because I'm using HimeWorks "Pre-Title Events" plugin for RMMV (https://himeworks.com/2015/11/pre-title-events/) where I encounter the issue, although I'm not sure if the issue is actually related to the plugin.

I'm using this plugin to run an event that keymaps the up/left/right/down functions to the WASD keys before the title screen, as I found it strange to have to have a game with WASD movement and menu navigation but still have to use the arrow keys on only the title menu. However, this is only partially working and I don't know why? When I have the plugin run this event (screenshot provided) pre-title, I can successfully use the "S" key to move down the title menu, but I cannot use the "W" key to move up. Why is this? It works perfectly fine within the game, and I've never had an issue when navigating up and down menus with W/S within the game. Why is it being weird on the title screen? Is it related to this plugin? Or is it something inherent in the RPG Maker engine?

Thanks for any explanations or ideas to fix this!
I think that's incorrect syntax for setting object literal values in a hash table. I think it ought to be Input.keymapper.87='up'

(my point of reference)
I think that's incorrect syntax for setting object literal values in a hash table. I think it ought to be Input.keymapper.87='up'

(my point of reference)

Aw, I was really hoping this would work!! Unfortunately, I tried each of the following but none of them work at all for any key:

Code:
Input.keymapper.87='up'
Input.keymapper.87 = 'up'
Input.keyMapper.87='up'
Input.keyMapper.87 = 'up'

The way I originally have it does work in general, like for the rest of the game (i.e. character movement, menu navigation, etc.), and it even works for the "S" key to move down the title screen menu. It's literally just the "W" that won't move up the title screen menu.

Thank you for the suggestion to try, though!
I tried each of the following but none of them work at all for any key:

Code:
Input.keymapper.87='up'
Input.keymapper.87 = 'up'
Input.keyMapper.87='up'
Input.keyMapper.87 = 'up'
Spacing around operators doesn't mean anything.

I'd suggest you take this out of an event and just make a plugin. Copy the Input.keymapper declaration from the rpg_core file into a new .js, change the keys you want right in there, then add that as a plugin.
Spacing around operators doesn't mean anything.

I'd suggest you take this out of an event and just make a plugin. Copy the Input.keymapper declaration from the rpg_core file into a new .js, change the keys you want right in there, then add that as a plugin.

Oh, I can do that?? Well, lemme give it a try! (I'll report back haha)

EDIT: Oh my goodness... so, putting it in the game as a plugin does work, but it's still having the same issue of the "W"/up key not working on the title screen 😅 I'm beginning to think there must be some kind of dedicated function for the "W" key specifically on the title menu or something, because I can't imagine why else that's the only key not working, and while it works everywhere else in the game but on the title??

Perhaps I'll try using a plugin to bypass the default title screen and create my own to replace it altogether, and see if that works... but that's gonna take some time haha

Thanks for the tips anyway, though! I'll probably keep the plugin version of my script anyway, because it's just simpler than putting it in events!
there is a plugin that changes keys to WASD (not my favorite though).

but Input.keymapper on its own is probably not the original code
by MV which is more Input.isTriggered(87) = "UP"; or .isPressed.

I think the WASD plugin would be better or switch between
WASD and Arrow keys would be better as I play mostly with arrows.
Just gonna clear up some misconceptions and misunderstandings here because it's gotten a little tangled.

First of all, your keyMapper syntax was correct, but so was ATT_Turan's. For properties that don't have a space in their name, there's no functional difference between using dot notation and square bracket notation. Personally I always use dot notation when I'm able to, but square bracket notation is never wrong.

@ShadowDragon You're mixing up two distinct things. Input.keyMapper defines *which* keys are recognised, and the string name they're represented by. Input.isTriggered(keycode) uses the strings defined by the keymapper.

I'm not entirely sure what your issue is here though, as 87 works fine for me when I map it to "up". I can use the W key to move up just fine. Do you maybe have another plugin that's assigning W a function?
For properties that don't have a space in their name, there's no functional difference between using dot notation and square bracket notation.
Good to know, thanks. I had a hard time finding a point of reference in the documentation (I perhaps wasn't looking up the correct terminology).
I'm not entirely sure what your issue is here though, as 87 works fine for me when I map it to "up". I can use the W key to move up just fine. Do you maybe have another plugin that's assigning W a function?

Were you just testing it normally within the game, or did you install that pre-title events plugin I mentioned and attempt to move up the title menu? Because it's only the title menu (and the initial load game selection) where I'm having issues - it does work perfectly fine everywhere else in the game after loading a save file or starting a new game (including all subsequent callings of the save/load window from within the actual game or ESC menu).

I don't think I have a conflicting plugin fighting over the "W" key, but I'll go digging/testing again to be extra sure.

Also, thank you for clearing up those points of confusion! That's exactly the kind of thing that's helped me piece things together about JS up to this point, and it only helps me understand it better the more that little details like these are pointed out (I once spent an hour or two completing an introductory JS lesson, but practically nothing stuck - my ADHD brain learns 1,000x more effectively in bits and pieces, and by actual problem-solving/doing with specific goals). So I wanted to give a shoutout for that because it seems small, but you did take actual time out of your day to type it out for our knowledge!
Were you just testing it normally within the game, or did you install that pre-title events plugin I mentioned and attempt to move up the title menu? Because it's only the title menu (and the initial load game selection) where I'm having issues - it does work perfectly fine everywhere else in the game after loading a save file or starting a new game (including all subsequent callings of the save/load window from within the actual game or ESC menu).

I don't think I have a conflicting plugin fighting over the "W" key, but I'll go digging/testing again to be extra sure.

Also, thank you for clearing up those points of confusion! That's exactly the kind of thing that's helped me piece things together about JS up to this point, and it only helps me understand it better the more that little details like these are pointed out (I once spent an hour or two completing an introductory JS lesson, but practically nothing stuck - my ADHD brain learns 1,000x more effectively in bits and pieces, and by actual problem-solving/doing with specific goals). So I wanted to give a shoutout for that because it seems small, but you did take actual time out of your day to type it out for our knowledge!
I didn't actually try installing the plugin, I was testing on MZ. Let me install it on MV and see if that makes a difference.

Edit: just tried it in MV with the pre-title events plugin and W was moving up in the title command window just fine, so it has to be something on your end that's preventing it.
I didn't actually try installing the plugin, I was testing on MZ. Let me install it on MV and see if that makes a difference.

Edit: just tried it in MV with the pre-title events plugin and W was moving up in the title command window just fine, so it has to be something on your end that's preventing it.

Thank you for testing that! That's actually super helpful to know, and means it can be fixed 😤

I'm gonna keep playing around and I'll update that the problem is solved if I figure out what was causing it!
DANGIT, Yanfly's Button Common Events plugin is the culprit 😔 I'm gonna have to either do more digging as to why, or make a difficult decision haha.

Either way, the source of the problem has been found so I would consider this thread solved! Thanks all for your input and guiding me in the right direction!
DANGIT, Yanfly's Button Common Events plugin is the culprit 😔 I'm gonna have to either do more digging as to why, or make a difficult decision haha.

Either way, the source of the problem has been found so I would consider this thread solved! Thanks all for your input and guiding me in the right direction!
1646947772919.png

Have you set a value other than 0 here in the parameters?

If not, it'll be line 918 in the button common events plugin, which sets Input.keyMapper[87] to "pagedown" when the game starts.
View attachment 219296
Have you set a value other than 0 here in the parameters?

If not, it'll be line 918 in the button common events plugin, which sets Input.keyMapper[87] to "pagedown" when the game starts.

Nope, it's set to 0 in my game, but I also tried setting it to an empty common event as well as trying the "SwitchButton" plugin command to see if either would "overwrite" the PageUp function somehow - no dice, haha.

BUT that makes so much more sense why the plugin in causing the issue now! I'd narrowed it down to being due to the default PageUp function, but I was confused why the plugin would affect that since I thought it was just built into the engine already. But the plugin actually actively keymaps it when the game starts, it makes sense now 😮

Getting rid of this line worked, so thank you so much!!! 😂

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-pre-title-keymapping-only-partially-working.145267/