Skip to content
Rpg Maker MV - Plugins - Keys Module
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
KeyModule_GetKey.html
KeysModule.js
README.md

README.md

There are three types of events for conditions with keyboard buttons:

js_keyDown - When you press the key, if holding the command will not repeat, it will only happen once

js_keyPress - For key pressed, this works for all letters, digits and calc keys, but does not work on others because they are for the exclusive use of the Rpg Maker System

js_keyUp - This works after using the KeyDown, you do not need to create a KeyDown condition, just hold the key for a short time and release

Here are the examples of how to use it, just like IF in Javascript for browsers:

js_keyDown == "KeyJ"

js_keyUp == "Space"

js_keyPress == "KeyH"

Example on Rpg Maker:

◆If :  Script : js_keyUp == "KeyJ"
  ◆ Comment: if use key J
  ◆
:End
◆If :  Script : js_keyUp == "KeyJ"
  ◆ Comment: Release key J
  ◆
:End
◆

See below the list of recommended keys:

 Keys       Script     Pressed       |      Functions     Script     Pressed
 {Up}       ArrowUp                  |      {F1}          F1
 {Down}     ArrowDown                |      {F2} -------- Show FPS ---------
 {Left}     ArrowLeft                |      {F3} --- Responsive or Normal --
 {Right}    ArrowRight               |      {F4} ------- FullScreen --------
 {Insert}   Insert                   |      {F5} ------- Goto Title --------
 {Home}     Home                     |      {F6}          F6
 {End}      End                      |      {F7}          F7
 {Delete}   Delete                   |      {F8}          F8
 {Ctrl}     CtrlLeft                 |      {F9}          F9
 {Ctrl}     CtrlRight                |      {F10}         F10
 {Shift}    ShiftLeft                |      {F11}         F11
 {Shift}    ShiftRight               |      {F12} -- Console (Debug Mode) --
 {Alt}      AltLeft                  |
 {Alt}      AltRight                 |
 {Esc}      Escape       (Yes)       |      Numbers       Script     Pressed
 {Space}    Space                    |      {1}           Digit1     (Yes)
 {Caps}     CapsLock                 |      {2}           Digit2     (Yes)
 {PageUp}   PageUp                   |      {3}           Digit3     (Yes)
 {PageDown} PageDown                 |      {4}           Digit4     (Yes)
 {Enter}    Enter        (Yes)       |      {5}           Digit5     (Yes)
                                     |      {6}           Digit6     (Yes)
                                     |      {7}           Digit7     (Yes)
 Letters    Script      Pressed      |      {8}           Digit8     (Yes)
 {A}        KeyA         (Yes)       |      {9}           Digit9     (Yes)
 {B}        KeyB         (Yes)       |      {0}           Digit0     (Yes)
 {C}        KeyC         (Yes)       |      {-}           Minus      (Yes)
 {D}        KeyD         (Yes)       |      {=}           Equal      (Yes)
 {E}        KeyE         (Yes)       |
 {F}        KeyF         (Yes)       |
 {G}        KeyG         (Yes)       |      Numeric Pad   Script     Pressed
 {H}        KeyH         (Yes)       |      {Num Lock}    NumLock     (Yes)
 {I}        KeyI         (Yes)       |      {1}           Numpad1     (Yes)
 {J}        KeyJ         (Yes)       |      {2}           Numpad2     (Yes)
 {K}        KeyK         (Yes)       |      {3}           Numpad3     (Yes)
 {L}        KeyL         (Yes)       |      {4}           Numpad4     (Yes)
 {M}        KeyM         (Yes)       |      {5}           Numpad5     (Yes)
 {N}        KeyN         (Yes)       |      {6}           Numpad6     (Yes)
 {O}        KeyO         (Yes)       |      {7}           Numpad7     (Yes)
 {P}        KeyP         (Yes)       |      {8}           Numpad8     (Yes)
 {Q}        KeyQ         (Yes)       |      {9}           Numpad9     (Yes)
 {R}        KeyR         (Yes)       |      {0}           Numpad0     (Yes)
 {S}        KeyS         (Yes)       |      {-}           Subtract    (Yes)
 {T}        KeyT         (Yes)       |      {+}           Add         (Yes)
 {U}        KeyU         (Yes)       |      {*}           Multiply    (Yes)
 {V}        KeyV         (Yes)       |      {/}           Divide      (Yes)
 {W}        KeyW         (Yes)       |      {.}           Comma       (Yes)
 {X}        KeyX         (Yes)       |      {,}           Decimal     (Yes)
 {Y}        KeyY         (Yes)       |
 {Z}        KeyZ         (Yes)       |
                                     |
                                     |
 Others                              |
 {P.Screen} PrintScreen (Only keyUp) |
 {S.Lock}   ScrollLock               |
 {Pause}    Pause                    |
You can’t perform that action at this time.