DKTools Full Input

DK

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

Version:
3.0

Author: DK

Site: DK Plugins

Description:
All keys of the keyboard and gamepad.

Requirements and dependencies:
  1. Availability of working plugin DKTools version 0.99 or above
  2. Version of RPG Maker 1.5+
Features:
  • Checking the press of any key on the keyboard or gamepad
  • Support for gamepad sticks
  • 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'

Left stick of gamepad separated from keys of controls (arrows) and have him own settings
Default values for left stick at RPG Maker MV: up, down, left, right
Values for left stick at this plugin: l_up, l_down, l_left, l_right

Values for right stick at this plugin: r_up, r_down, r_left, r_right

Instruction from "Help"

Code:
All functions return name of pressed button
If button was don't pressed, then function returns null

returnCode - return key code ? true or false
If returnCode is false, then will return name of button

Added functions for check pressed key code:

Input.keyPressed(code, gamepadCode, returnCode)
Input.keyTriggered(code, gamepadCode, returnCode)
Input.keyRepeated(code, gamepadCode, returnCode)
Input.keyLongPressed(code, gamepadCode, returnCode)

code - keyboard key code
gamepadCode - gamepad key code

If need check only gamepad, write null instead the codes

Functions to check any directions of moving buttons:
Checking is carried out for the symbols: up, down, left, right
Input.anyDirectionPressed(returnCode)
Input.anyDirectionTriggered(returnCode)
Input.anyDirectionRepeated(returnCode)
Input.anyDirectionLongPressed(returnCode)

Functions to check deflection of left stick to any direction:
Checking is carried out for the symbols: l_up, l_down, l_left, l_right
Input.anyLDirectionPressed(returnCode)
Input.anyLDirectionTriggered(returnCode)
Input.anyLDirectionRepeated(returnCode)
Input.anyLDirectionLongPressed(returnCode)

Functions to check deflection of right stick to any direction:
Checking is carried out for the symbols: r_up, r_down, r_left, r_right
Input.anyRDirectionPressed(returnCode)
Input.anyRDirectionTriggered(returnCode)
Input.anyRDirectionRepeated(returnCode)
Input.anyRDirectionLongPressed(returnCode)

Functions to check one of many buttons with key codes:
Input.anyKeyPressed(codes, gamepadCodes, returnCode)
Input.anyKeyTriggered(codes, gamepadCodes, returnCode)
Input.anyKeyRepeated(codes, gamepadCodes, returnCode)
Input.anyKeyLongPressed(codes, gamepadCodes, returnCode)

codes - array of codes keyboard buttons
gamepadCodes - array of codes gamepad buttons

If need check only gamepad, write null instead the code

Functions to check one of many buttons with key names:
Input.anyPressed(keys, returnCode)
Input.anyTriggered(keys, returnCode)
Input.anyRepeated(keys, returnCode)
Input.anyLongPressed(keys, returnCode)

keys - array of buttons name

Functions to check pressing of any numbers:
Input.anyNumberPressed(returnCode)
Input.anyNumberTriggered(returnCode)
Input.anyNumberRepeated(returnCode)
Input.anyNumberLongPressed(returnCode)

Functions to check pressing of any Numpad buttons:
Input.anyNumpadPressed(returnCode)
Input.anyNumpadTriggered(returnCode)
Input.anyNumpadRepeated(returnCode)
Input.anyNumpadLongPressed(returnCode)

Functions to check pressing of any alphabet letters:
Input.anyAlphabetPressed(returnCode)
Input.anyAlphabetTriggered(returnCode)
Input.anyAlphabetRepeated(returnCode)
Input.anyAlphabetLongPressed(returnCode)

Functions to check pressing of any F1-F12 button:
Input.anyFPressed(returnCode)
Input.anyFTriggered(returnCode)
Input.anyFRepeated(returnCode)
Input.anyFLongPressed(returnCode)

Also added functions for checking pressed Backspace, Tab, Enter, Shift, Ctrl, Alt, Escape, Space

Backspace:
Input.BackspacePressed()
Input.BackspaceTriggered()
Input.BackspaceRepeated()
Input.BackspaceLongPressed()

Tab:
Input.TabPressed()
Input.TabTriggered()
Input.TabRepeated()
Input.TabLongPressed()

Enter:
Input.EnterPressed()
Input.EnterTriggered()
Input.EnterRepeated()
Input.EnterLongPressed()

Shift:
Input.ShiftPressed()
Input.ShiftTriggered()
Input.ShiftRepeated()
Input.ShiftLongPressed()

Ctrl:
Input.CtrlPressed()
Input.CtrlTriggered()
Input.CtrlRepeated()
Input.CtrlLongPressed()

Alt:
Input.AltPressed()
Input.AltTriggered()
Input.AltRepeated()
Input.AltLongPressed()

Escape:
Input.EscapePressed()
Input.EscapeTriggered()
Input.EscapeRepeated()
Input.EscapeLongPressed()

Space:
Input.SpacePressed()
Input.SpaceTriggered()
Input.SpaceRepeated()
Input.SpaceLongPressed()

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;

Supported languages: Russian, English

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

DK

Veteran
Veteran
Joined
Mar 30, 2016
Messages
105
Reaction score
94
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
105
Reaction score
94
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
105
Reaction score
94
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
105
Reaction score
94
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
105
Reaction score
94
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
105
Reaction score
94
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
238
Reaction score
167
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
105
Reaction score
94
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
238
Reaction score
167
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
7
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
105
Reaction score
94
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
7
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
105
Reaction score
94
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
7
First Language
English
Primarily Uses
RMMV
@DK Thanks man, I will try it out!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

buinguyenhoangtho wrote on fizzly's profile.
Hello @fizzly, i would like to use your asset/ resource for my project ( is maybe commercial ). May i have your permission? Thanks you !
Working on breaking the limits of RPGMaker! :cool:
I have 470+ hours on RMMV but have only made a demo game, is this normal? :kaoswt: (I lose motivation a lot plus I use a 32gb laptop, so..)
I like Iron Maiden.
Benku wrote on Magnus0808's profile.
Hey man you helped me out a long time ago with a plugin i was wondering if you can help me out one more time since its literally the last thing i need help with if not is cool but id figured id ask you one more soild.

Forum statistics

Threads
95,427
Messages
929,082
Members
125,659
Latest member
AphoticAmaranth
Top