An open library of RPG Maker MZ plugins, powered by the community.

PGMZ - The Community-Driven Plugin Library for RPG Maker MZ

MZ plugins

NUUN User Key - NUUN_UserKey.js

Plugin desc : Key button assignment

License : MIT License

Author : NUUN

Website : https://github.com/nuun888/MZ/blob/master/NUUN_UserKey.js

Download Page : https://raw.githubusercontent.com/nuun888/MZ/master/NUUN_UserKey.js

File name : NUUN_UserKey.js

Help of plugin :

* @target MZ
 * @plugindesc Key button assignment
 * @author NUUN
 * @base NUUN_Base
 * @orderAfter NUUN_Base
 * @version 1.3.1
 * 
 * @help
 * You can change keyboard keys and gamepad button assignments or set new ones.
 * 
 * The button layout of the gamepad is based on the Xbox360 controller.
 * If the keyboard or gamepad code is set to -1, the original value is set.
 * 
 * If you want to execute a script by key input from a specific scene, enter the script in "Any script".
 * If there is processing in "Any script", it will not be executed from the handler.
 * 
 * Button UI Settings
 * If neither "Button Image" nor "Button image when pressed" is specified, the button image called from the handler will be set to the image in "ButtonSet.png".
 * The X position of the button will be displayed every 48 pixels from the left edge of the image.
 * To specify a decision button, set "Image X Position" to 8 and "Width" to 2.
 * 
 * Independent button UI settings
 * If executing from "Any script", set the button to be displayed directly on the scene.
 * Set the button UI position using the coordinates "Image X coordinate" and "Image Y coordinate".
 * 
 * specification
 * When applying key and button settings on the scene, the key or button will not respond unless a script or common event is specified.
 * Multiple application scenes can be set. If not set, it applies to all scenes.
 * 
 * Terms of Use
 * This plugin is distributed under the MIT license.
 * 
 * Log
 * 8/3/2025 Ver.1.3.1
 * Added a feature to hide buttons.
 * 4/29/2025 Ver.1.3.0
 * Added button settings.
 * 6/16/2024 Ver.1.2.8
 * Some processing has been corrected.
 * 5/11/2024 Ver.1.2.7
 * Added the ability to play SE when a valid key is pressed.
 * 8/4/2023 Ver.1.2.6
 * Added a function to enable keys and buttons (gamepad) under certain conditions.
 * 4/9/2023 Ver.1.2.5
 * Fixed an issue that caused an error when performing normal key operations.
 * 3/25/2023 Ver.1.2.4
 * Changed the use of key button trigger apply on scene.
 * 3/12/2023 Ver.1.2.3
 * Added a function that can specify common events for key button triggers on the scene.
 * 3/11/2023 Ver.1.2.2
 * Added definition by updating “NUUN_realMoveLeftStick”.
 * 3/7/2023 Ver.1.2.1
 * Modified the definition by supporting the left stick axis change amount proportional movement plug-in.
 * 3/7/2023 Ver.1.2.0
 * Added the ability to dash when the left stick is pushed all the way down.
 * 3/6/2023 Ver.1.1.1
 * Fixed an issue where the gamepad code was not recognized in the scene key and button settings.
 * 3/5/2023 Ver.1.1.0
 * Compatible with right stick.
 * 3/4/2023 Ver.1.0.1
 * Added repeat feature.
 * Fixed so that the set keys and buttons work even in battle.
 * 2/28/2023 Ver.1.0.0
 * First edition.
 * 
 * @param UserKey
 * @type struct<UserKeyList>[]
 * @text Key setting
 * @desc Key setting.
 * @default ["{¥"UserKey¥":¥"{¥¥¥"KeyCode¥¥¥":¥¥¥"65¥¥¥",¥¥¥"GamePadCode¥¥¥":¥¥¥"6¥¥¥",¥¥¥"KeyName¥¥¥":¥¥¥"¥¥¥¥¥¥¥"pagedown2¥¥¥¥¥¥¥"¥¥¥",¥¥¥"Repeated¥¥¥":¥¥¥"true¥¥¥",¥¥¥"KeySprict¥¥¥":¥¥¥"¥¥¥",¥¥¥"MapValid¥¥¥":¥¥¥"true¥¥¥",¥¥¥"BattleValid¥¥¥":¥¥¥"false¥¥¥"}¥"}","{¥"UserKey¥":¥"{¥¥¥"KeyCode¥¥¥":¥¥¥"83¥¥¥",¥¥¥"GamePadCode¥¥¥":¥¥¥"7¥¥¥",¥¥¥"KeyName¥¥¥":¥¥¥"¥¥¥¥¥¥¥"pageup2¥¥¥¥¥¥¥"¥¥¥",¥¥¥"Repeated¥¥¥":¥¥¥"true¥¥¥",¥¥¥"KeySprict¥¥¥":¥¥¥"¥¥¥",¥¥¥"MapValid¥¥¥":¥¥¥"true¥¥¥",¥¥¥"BattleValid¥¥¥":¥¥¥"false¥¥¥"}¥"}","{¥"UserKey¥":¥"{¥¥¥"KeyCode¥¥¥":¥¥¥"-1¥¥¥",¥¥¥"GamePadCode¥¥¥":¥¥¥"10¥¥¥",¥¥¥"KeyName¥¥¥":¥¥¥"¥¥¥¥¥¥¥"leftstick¥¥¥¥¥¥¥"¥¥¥",¥¥¥"Repeated¥¥¥":¥¥¥"false¥¥¥",¥¥¥"KeySprict¥¥¥":¥¥¥"¥¥¥",¥¥¥"MapValid¥¥¥":¥¥¥"true¥¥¥",¥¥¥"BattleValid¥¥¥":¥¥¥"false¥¥¥"}¥"}","{¥"UserKey¥":¥"{¥¥¥"KeyCode¥¥¥":¥¥¥"-1¥¥¥",¥¥¥"GamePadCode¥¥¥":¥¥¥"11¥¥¥",¥¥¥"KeyName¥¥¥":¥¥¥"¥¥¥¥¥¥¥"rightstick¥¥¥¥¥¥¥"¥¥¥",¥¥¥"Repeated¥¥¥":¥¥¥"false¥¥¥",¥¥¥"KeySprict¥¥¥":¥¥¥"¥¥¥",¥¥¥"MapValid¥¥¥":¥¥¥"true¥¥¥",¥¥¥"BattleValid¥¥¥":¥¥¥"false¥¥¥"}¥"}"]
 * 
 * @param GamepadSetting
 * @text Gamepad settings
 * @default ------------------------------
 * 
 * @param GamepadLeftStickMaxDash
 * @desc Push the left stick to the maximum axis to dash.
 * @text Left axis maximum dash
 * @type boolean
 * @default true
 * @parent GamepadSetting
 *

スポンサードリンク

-MZ plugins

Copyright© PGMZ - The Community-Driven Plugin Library for RPG Maker MZ , 2026 All Rights Reserved.