Full Input - All keys of the keyboard and gamepad

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
Title: Full Input

Version: 4.0.0

Author: DKPlugins

Description:
All keys of the keyboard and gamepad.

Requirements and dependencies:
  1. Availability of working plugin DKTools version 8.3.0 or above
  2. Version of RPG Maker 1.6+
  3. Version of project 1.6+
Features:
  • Checking the press of any key on the keyboard or gamepad
  • Support for gamepad sticks and triggers
  • Enabling switches when you press a key
Warning from "Help"

Default RPG Maker MV values for Alt, Space, Insert, Q, W, X, Z
Alt: 'control'
Space: 'ok'
Insert: 'escape'
Q: 'pageup'
W: 'pagedown'
X: 'escape'
Z: 'ok'

The values of this plugin for Alt, Space, Insert, Q, W, X, Z
Alt: 'alt'
Space: 'space'
Insert: 'insert'
Q: 'q'
W: 'w'
X: 'x'
Z: 'z'

Instruction from "Help"
###===========================================================================
## Added functions
###===========================================================================
Added tracking of gamepad triggers pressing and axis tilts
Tested on Xbox One Wireless Gamepad
Use to get values:
Input.gamepad.lt - left trigger (float value of the force of pressing in the range from 0 to 1)
Input.gamepad.rt - right trigger (float value of the force of pressing in the range from 0 to 1)
Input.gamepad.axes - axes (Array with 4 float values)
The axes have the following structure:
[X-axis (left stick), Y-axis (left stick), X-axis (right stick), Y-axis (right stick)]

Input.preferGamepad () - Returns true if the player is playing a gamepad

Input.isAnyPressed(keys) - Returns true if at least one key is pressed (keys not specified).
Returns true if at least one key from the keys array is pressed (keys is an array of keys).

Input.isAnyTriggered(keys) - Returns true if at least one key is pressed and released (keys not specified).
Returns true if at least one key from the keys array is pressed and released (keys is an array of keys).

Input.isAnyRepeated(keys) - Returns true if pressing at least one key is repeated (keys not specified).
Returns true if pressing at least one key from the keys array is repeated (keys is an array of keys).

Input.isAnyLongPressed(keys) - Returns true if at least one key is pressed for a long time (keys not specified).
Returns true if at least one key from the keys array is pressed for a long time (keys is an array of keys).

Input.getPressedTime (keyName) - Returns the time the keyName was pressed in frames.

If you create a plugin based on this:
Before using any function, make sure that the user has installed the plugin:
if (Imported.DKTools_Full_Input) {}

Get plugin version:
var version = Imported.DKTools_Full_Input;

"Help" languages: English, Russian

Download: https://dk-plugins.ru/mv/input/full-input/
 
Last edited:

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
Update to version 2.0


Updated translations


Added support for gamepad right stick, left stick separated from arrow keys and added a lot of function for keys check (all information in plugin "Help")


Also warns that when you install the plugin, you can not walk on the left stick gamepad, because he has a new settings (this is also stated in the "Help")
 

Eff-n-Geoff

Veteran
Veteran
Joined
Oct 26, 2015
Messages
182
Reaction score
7
First Language
English
Hi there @DK, this plugin might be just what we have been looking for for weeks now ...


However, the issue we have is that the buttons don't seem to map to keys when we change them in the js file. Here is what we have changed ...



// Код клавиши: символ в кавычках
// Key code: symbol in quotes
Input.gamepadMapper = {
0: 'ok', // A
1: 'cancel', // B
2: 'shift', // X
3: ‘e’, // Y
4: 'pageup', // LB (L1)
5: 'pagedown', // RB (R1)
6: 'lt', // LT (L2)
7: 'rt', // RT (R2)
8: ‘m’, // Select


The issue here is that we are also using Yanfly's Keyboard Common Events, and we run one common event when the player presses the E key, and one when they press M


Could you possibly assist in getting your plugin to work with Yanfly's one? Happy to pay for this ...
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
New version


Fix for 'y' button


Added '/' button


Optimisation and documentation
 

Magixe

(∩ᄑ_ᄑ)⊃━☆゚*・。*・:≡( ε:)
Veteran
Joined
Feb 15, 2016
Messages
48
Reaction score
23
First Language
English
Primarily Uses
N/A
Just what I was looking for. :)  Is this free for commercial use?
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
Just what I was looking for. :)  Is this free for commercial use?
Yes. Full terms of use you may find in the "Help" of plugin
 

nandaron

currently doing voice work
Member
Joined
Jan 22, 2017
Messages
12
Reaction score
6
First Language
English
Primarily Uses
RMMV
Hello DK, really appreciate your work on this plugin, but was wondering if you or another knowledgeable poster could assist me.


I am having a similar issue as @Eff-n-Geoff. I can't seem to get the plug-in to work as intended.


When it is active I can only get the 8 regular buttons to work (d-pad, a, b, x, y). The analog sticks don't work at all, and editing the file to have a button press a different button yields no change. 


When I edit the .js file, Am I to only update the "Input.keyMapper = {" information?


I am basically trying to get a gamepad button to press the "j" button on the keyboard, thus running a common event, "jump."


Any help would be appreciated. 
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
Привет DK, очень ценю вашу работу над этим плагином, но было интересно, если вы или другой осведомленный плакат мог бы помочь мне.


У меня такой же вопрос , как @ Eff-н-Джеффа . Я не могу показаться , чтобы получить плагин , чтобы работать , как предполагалось.


Когда она активна, я могу получить только 8 регулярные кнопки для работы (D-Pad, а, Ь, х, у). Аналоговые палочки не работают вообще, а также редактирование файла, чтобы иметь кнопку нажать другую кнопку выходов никаких изменений. 


Когда я отредактировать файл .js, Должен ли я обновить только "Input.keyMapper = {" информацию?


Я в основном пытаются получить кнопку геймпада нажать на кнопку "J" на клавиатуре, таким образом, работает общее событие, "прыжок".


Любая помощь будет оценена. 


Hi
"Input.keyMapper" for keyboard
"Input.gamepadMapper" for gamepad


You can create parallel event. Add "Conditional Branch" and use script. (All scripts you can find in plugin Help)

2017-01-31_15-53-11.png2017-01-31_15-54-03.png
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
Plugin updated to version 3.0

Settings are transferred from the file to the plugin itself
Added the ability to turn on the switch when you press a key
 

Noobk

Boo-Boo'Da'Foo
Veteran
Joined
Dec 23, 2015
Messages
162
Reaction score
208
First Language
English
Primarily Uses
N/A
Thank you very much for this. Such a game changer as for as quality of life!
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
If you use YEP_KeyboardConfig plugin, then place DKTools_Full_Input plugin higher (if you are experiencing problems).
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
240
Reaction score
169
First Language
English
Primarily Uses
Other
This plugin has taken me a bit to figure out. I figured out most the gamepad buttons but I cannot for the life of me figure out how to set the LR trigger and LR buffers of the gamepad to a conditional statement.

Currently I use
Code:
Input.keyPressed(null, 5)
5 = pagedown according to the gamepad settings. But it will not run the test message when I hit pagedown (which I'm guess that is right buffer, either way I hit all the buttons and don't get anything). Am I doing something wrong for the triggers/buffer buttons?
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
This plugin has taken me a bit to figure out. I figured out most the gamepad buttons but I cannot for the life of me figure out how to set the LR trigger and LR buffers of the gamepad to a conditional statement.

Currently I use
Code:
Input.keyPressed(null, 5)
5 = pagedown according to the gamepad settings. But it will not run the test message when I hit pagedown (which I'm guess that is right buffer, either way I hit all the buttons and don't get anything). Am I doing something wrong for the triggers/buffer buttons?
What version of the plugin are you using? And are there any other plugins to change the keyboard / gamepad?
 

bazrat

Pixel Game Maker MV
Veteran
Joined
Oct 15, 2018
Messages
240
Reaction score
169
First Language
English
Primarily Uses
Other
What version of the plugin are you using? And are there any other plugins to change the keyboard / gamepad?
Thanks for the reply DK. I am using the current version and I actually found the problem, it was yanflys Gamepadconfig plugin(it was below yours). It seems like it reset everything when I loaded up the game. I turned that off and got it all working again. xD
 
  • Like
Reactions: DK

Wizorrd

Villager
Member
Joined
Feb 17, 2019
Messages
28
Reaction score
9
First Language
English
Primarily Uses
RMMV
Sorry to bother @DK but I am just wondering if you have a screenshot of the section I need to edit. Trying to figure it all out. I'm just confused as to where in the js file I need to go. Thanks in advance.
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
Sorry to bother @DK but I am just wondering if you have a screenshot of the section I need to edit. Trying to figure it all out. I'm just confused as to where in the js file I need to go. Thanks in advance.
All keyboard and gamepad settings are in the plugin parameters. In the program, not in the file itself.
 

Wizorrd

Villager
Member
Joined
Feb 17, 2019
Messages
28
Reaction score
9
First Language
English
Primarily Uses
RMMV
All keyboard and gamepad settings are in the plugin parameters. In the program, not in the file itself.
I can't seem to get the buttons to work when changing them in the parameters themselves. I could set it up with a parallel event like you were talking about, but the problem is, to put parallel events on every map so that it reads when the player presses the button, isn't exactly the best, since I assume that would cause some lag. Maybe I am missing exactly how I am to set it up. Sorry for the questions. Basically I am just trying to figure out how to get the left and right bumper (L1)/(R1) to be used in game, but if I set the buttons up in the parameter and try them out, they don't work at all, as well as for some reason the thumb sticks don't work at all when your plugin is active, but they do when it's disabled.
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
I can't seem to get the buttons to work when changing them in the parameters themselves. I could set it up with a parallel event like you were talking about, but the problem is, to put parallel events on every map so that it reads when the player presses the button, isn't exactly the best, since I assume that would cause some lag. Maybe I am missing exactly how I am to set it up. Sorry for the questions. Basically I am just trying to figure out how to get the left and right bumper (L1)/(R1) to be used in game, but if I set the buttons up in the parameter and try them out, they don't work at all, as well as for some reason the thumb sticks don't work at all when your plugin is active, but they do when it's disabled.
I made a demo for you: DropBox
I configured the keys L1 (LB ) and R1 (RB )
In the settings of the gempad these keys are numbered 4 and 5.
I also set the switches to turn on automatically when these keys are pressed (see the third item in the plugin settings).
Now that everything is set up, you can create common events that work on these switches. I created 2 common events, watch them. They will be activated only when the corresponding keys are pressed.

If you are unsuccessful or have any questions, ask again.
 

Wizorrd

Villager
Member
Joined
Feb 17, 2019
Messages
28
Reaction score
9
First Language
English
Primarily Uses
RMMV
@DK Thanks man, I will try it out!
 

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
150
Reaction score
131
First Language
Russian
Primarily Uses
RMMV
Plugin updated to version 3.1.0

What's new:
  • Added a description of the buttons (keyboard and gamepad) in the settings
  • Added tracking of gamepad axes and force of pressing triggers
  • Added gamepad tracking function
  • Help updated
  • Removed unused functions
Plugin now requires minimum DKTools 8.3.0

First post updated!
 

Users Who Are Viewing This Thread (Users: 1, Guests: 2)

  • Latest Threads

    Latest Posts

    Latest Profile Posts

    X[ oh gawd.... I dropped my super expensive laptop on my hard tile floor! It still comes on and all, but now Im worried its gunna start screwing up in the near future.... I hope not, cant afford to replace stuff like that. :(
    I wrote a nice animated preloading system for mv+mz today. It only supports graphic assets atm, should it support audio too? See it in action in my recent minigame @
    I posted my first commercial game on the forums, and now waiting for approval.
    fingers crossed.
    TMW the air quality is so bad, your hair changes color every time you wash it. :LZYyuck:
    Finished two animations today. :kaojoy:

    Forum statistics

    Threads
    103,002
    Messages
    996,645
    Members
    134,484
    Latest member
    Gesonel
    Top