Keyboard Config MZ

This is the documentation for the “Keyboard Config” plugin for RPG Maker MZ.

Keyboard Config

Controls

Allowed Settings

Settings Vocab

Custom Actions

General Info

This plugin allows you to set up a custom keyboard configuration for your game. It also allows you to set up a menu for the player so they can customize the controls by themselves.

On top of that there is a way to define custom keyboard inputs for triggering switches or even third party input commands. These commands can be enabled for customization aswell.

If you’re receiving JSON Errors, you can always check the Console by pressing F12. The plugin is written in a way that it will hint at the setting that contains the faulty JSON.

Back to top

Controls

The Controls settings allow you to switch between the save modes an set whether the player should be able to customize the inputs or not.

Settings

Controls Settings
  • Save Mode:

    Switches between storing the applied keyboard config data in the player config file or for the base configuration that will be used for the player. If you want to set a custom basic configuration you should use “Base Config” first

  • Player Settings:

    Enables / disables the controls settings menu inside the game options. When enabled you and / or the player can customize the inputs

Back to top

Allowed Settings

These settings determine which keyboard inputs can  be changed inside the menu when “Player Settings” is enabled.

Settings

Allowed-Settings
  • Movement Settings:

    Enables / disables the customization for these commands:

    • Up
    • Down
    • Left
    • Right
    • Dash
  • Action Settings:

    Enables / disables the customization for these commands:

    • Ok
    • Cancel
    • Pageup
    • Pagedown
    • Control
  • Custom Action Settings:

    Enables / disables the customization for the “Custom Actions

  • Number of Columns:

    Set the number of avialable colums per command. Multiple columns allow for multiple inputs to be used per command!

Back to top

Settings Vocab

These settings are the custom translation for the different texts in the plugin. Use them to translate the options menu as necessary. Any options missing will be taken from the “Terms” tab of the database. They do NOT contain the button names!

Settings

Settings-Vocab
  • Control Settings Name:

    The name for the settings inside the options menu

  • Change Controls Command:

    The name for the command to change/edit the controls in the menu

  • Change Controls Help 1:

    The help window text to hint at selecting the input you want to change

  • Change Controls Help 2:

    The help window text to hint that a new button should be pressed in order to change the setting

  • Reset Controls Command:

    The name for the command to reset the controls back to default

  • Apply Controls Command:

    The name for the command to apply/save the controls setup

  • Apply Success Text:

    The text that shows after saving the controls setup

Back to top

Movement

These are the translations for the movement related keyboard inputs.

Settings

Movement
  • Up:

    Translation for the Up command name

  • Down:

    Translation for the Down command name

  • Left:

    Translation for the Left command name

  • Right:

    Translation for the Right command name

  • Dash:

    Translation for the Dash command name

Back to top
Settings Vocab

Actions

These are the translations for the basic actions related keyboard inputs.

Settings

Actions
  • OK:

    Translation for the OK command name

  • Cancel:

    Translation for the Cancel command name

  • Previous Page:

    Translation for the Pageup command name

  • Next Page:

    Translation for the Pagedown command name

  • Control:

    Translation for the Control command name

Back to top
Settings Vocab

Custom Actions

Custom Actions allow you to bind switches (and thus common events / events) and third party inputs to the keyboard. You can also set them to be changed by the player if “Player Settings” and “Action Settings” are enabled. You can set up as many Custom Actions as you want.

Custom Actions do not have a default input. You will have to set it up by using the corresponding “Save Mode

Settings

Custom-Actions
  • Display Name:

    The name of the input inside the config menu

  • Keymap Name:

    Set this to the exact name of the input if you’re mapping a third party command

  • Type:

    Set whether you want to trigger a switch or a third party command

  • ID:

    The ID of the switch that should be triggered

  • Handler:

    Set how the switch should be handled. You can either activate, deactivate or set it to the automatic opposite of its current state

Hint for third party commands

If you’re not sure whether you can actually implement the command you’re wanting to you should refer to the documentation of that third party plugin. If the documentation does not provide any help, contacting the author of that particular plugin might help.

Back to top

Setting a Base Config

You can set up a customized base keyboard configuration by setting the “Save Mode” to “Base Config”.

Then start the testplay with the “Player Settings” activated and set up the config you want.

Once you’ve done that set the “Save Mode” to “Player”, start a testplay and save again.

The controls will then be used as standard inputs. If the player is able to customize the controls they will be the default option when hitting “Reset” aswell.

Back to top

Translating the Keytable

If you wish to translate the button names that are shown inside the controls configuration scene you can use this step by step guide.

Keyboard Config Window

Button name for the up arrow on the keyboard

  • Button name for the up arrow on the keyboard

Step 1

Open the file “/js/plugins/mewgles/keytable.json” with a decent text editor. I recommend Notepad++ for this as it is able to properly deal with the .json file format.

Keytable File

Open this file with Notepad++ or something alike

  • Open this file with Notepad++ or something alike

Step 2

The file contains the keymapping for the whole keyboard so it’s quite lengthy. If you want to change the translation you have to make sure to keep its structure as it is. This is very important as it will throw errors otherwise. So make sure to only change the 2nd sub entry of each button. And make sure to keep the “” around the words.

Keytable Translation

Translated name of the “Backspace” button on the keyboard

  • Translated name of the “Backspace” button on the keyboard

Step 3

Save the file and start a testplay to check if your translations are working.

If there is any errors you can either try to fix them, or simply delete the keytable.json file from the project. The plugin will then create a new one upon the next testplay start.

Back to top

Tipps & Tricks

  • If you’re having issues with errors when setting up the plugin for the first time, try to restart testplay. Unless there was some major mistakes done, it should fix itself doing that.

  • If you want to reset the overall control settings you can delete the following files from the project:

    • /save/controls.rmmzsave
    • /js/plugins/mewgles/key_config.json

    They will be freshly generated once you set up a new config.

  • If you want to reset the translation for the buttons you can delete /js/plugins/mewgles/keytable.json. It will be freshly generated upon the next testplay.

  • You can still use debugmode (F9) during testplay. The plugin automatically enables it during testing. You can not rebind it to a different key though. This also means that if you set another action to F9, it will most likely trigger both actions.

Back to top