How do you script call to check for keyboard button?

I know that the numberpad up down left and right can't be checked for being pressed without a script, so how would i do so? I want to be able to move a separate event  using those keys.......
Hello! In the fourth (final) tab of Conditional Branch (Event Command) you can check for button input, a dropdown menu will let you pick a key from a list of available keys.

If you want to use a script call, it would be something like Input.trigger?🙂SYMBOL), Input.press?🙂SYMBOL) or Input.repeat?🙂SYMBOL), depending on the behavior you want. :SYMBOL would be the actual symbol representing the key, like 😀OWN, :LEFT, :RIGHT, :UP, :X, :R, etc. Check "Input" module reference in the help file for more information. 🙂
Yes but in conditional branch, the numberpad keys aren't there, its only a few letters and the up down left and right that's under the enter key. I need to use the numberpad directions
 

EDIT: So what would the script call be for a Number Pad Key? (8=up 2 = down 4=left 6=right)
you can check for button input,
That is exactly the important part, and because of that most of the rest of your answer is wrong.
RM chacks for button input, it cannot check for any keyboard input.


The button :A is NOT the same as the key A on the keyboard.


RM's input simulates a gamepad, that's why the button codes include :R and :L but not the regular keyboard options.


Additionally there is a configuration setting available by F1 ingame that allows the player to change the keyboard mapping and define different keys than the default to stand for :A, :B and so on.


To check for keyboard input you first have to use a script that gives you keyboard input, otherwise you'll always be limited to the keys available on configuration. And if you use such a script, the script call to check for any input depends on the script and can't be described in general.
Yes but in conditional branch, the numberpad keys aren't there, its only a few letters and the up down left and right that's under the enter key. I need to use the numberpad directions

EDIT: So what would the script call be for a Number Pad Key? (8=up 2 = down 4=left 6=right)
The number pad keys are not supported in the default Input module of RPG Maker. You would need a custom input script to support those keys.

I would advice against using those keys though, not every keyboard has them, and it is possible that not all of your players will have them.

That is exactly the important part, and because of that most of the rest of your answer is wrong.

RM chacks for button input, it cannot check for any keyboard input.

The button :A is NOT the same as the key A on the keyboard.

RM's input simulates a gamepad, that's why the button codes include :R and :L but not the regular keyboard options.

Additionally there is a configuration setting available by F1 ingame that allows the player to change the keyboard mapping and define different keys than the default to stand for :A, :B and so on.

To check for keyboard input you first have to use a script that gives you keyboard input, otherwise you'll always be limited to the keys available on configuration. And if you use such a script, the script call to check for any input depends on the script and can't be described in general.
My answer is not wrong, I never said that the :A symbol represents the :A key, I told them to check the default Input documentation in the help file if they wanted to use a script call 🙂
Yes but in conditional branch, the numberpad keys aren't there, its only a few letters and the up down left and right that's under the enter key. I need to use the numberpad directions


EDIT: So what would the script call be for a Number Pad Key? (8=up 2 = down 4=left 6=right)
RPG Maker does not support numpad by default.


One solution is to use a script that will allow you to check for keyboard input, or a script that will allow you to bind numpad keys to the default buttons (which would probably be covered by a keyboard input script)
I would advice against using those keys though, not every keyboard has them, and it is possible that not all of your players will have them.
This. So many times... this.


I don't have a number pad on my computer, nor do many users who primarily use a laptop with a limited keyboard, meaning that the usage of the number pad often requires a little bit of finger gymnastics using the fn key (or the OEM equivalent for the laptop).
https://github.com/Dekita/Dekyde-Ace/tree/master/Input

The link above contains an array of scripts to provide additional control or add cool features to the input system.  None of the scripts in the link above are available for commercial games.  The 'Input' script itself allows for checking any key press. (it also requires the 'Virtual Key Codes' script to function) 🙂
Lol. I'm not worried about other people's computers because i'm keeping this game to myself.
The problem with Input scripts is that they usually remove the default gamepad support that Rpg Maker has.
< working on full DirectX9 gamepad input as part of y input system - for obtaining full usage of the keys given from say, an xbox controller.  Not sure when that will be finished though. :/
If I had any way to know what modules/functions are called on the default Input::trigger? method, I would me more than happy already.
Two possible solutions come to mind.

#1 - Find a Keyboard Input Script and look at its code

#2 - Fullscreen Scripts

Keyboard should be pretty obvious, but a Fullscreen Script works very similarly by simulating the keypresses of ALT+Enter.

      # Alt Enter to go to Fullscreen
      showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
      showm.call(18,0,0,0)  # Hold the Alt Keyboard key
      showm.call(13,0,0,0)  # Hold the Enter Keyboard key
      showm.call(13,0,2,0)  # Release the Enter Keyboard key
      showm.call(18,0,2,0)  # Release the Alt Keyboard key

A bit over my head to explain, and also doesnt detect Input, but simulates it.
There is no way to gain access to the default input methods; however, one would imagine that they use similar calls to the user32 dll, either calling GetKeyboardState or GetKeyState an insane amount of times for each key (i think the latter considering my input update is faster than the defaults (which should be much faster as it uses a more powerful code than ruby))

Edit: feel free to check my scripts for how i detect the key information. 🙂
I also would like a Link to a non Buggy full Functional Keyboard Script someone Tested and therefor can recoment.

I dont need Game Pad Possibility this Time.

Someone has expirience with this?
I also would like a Link to a non Buggy full Functional Keyboard Script someone Tested and therefor can recoment.

I dont need Game Pad Possibility this Time.

Someone has expirience with this?
Are you saying my input script is buggy?  I linked it above and dont see why you would need an alternative. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-script-call-to-check-for-keyboard-button.36208/