# Change inputs
When you create your game, you can pass global configurations (used by you and the installed modules)
- Create a
src/config/inputs.ts
file with the following code:
import { Input, Control } from '@rpgjs/client'
export const inputs = {
[Control.Up]: {
repeat: true,
bind: Input.Up
},
[Control.Down]: {
repeat: true,
bind: Input.Down
},
[Control.Right]: {
repeat: true,
bind: Input.Right
},
[Control.Left]: {
repeat: true,
bind: Input.Left
},
[Control.Action]: {
bind: [Input.Space, Input.Enter]
},
[Control.Back]: {
bind: Input.Escape
}
}
This is a very good way to customize the keyboard entries. The key corresponds to the type of control (used by the keyboard, the mouse, or a joystick, etc.) and the value corresponds to the action
You have information here: Set Inputs
- Then put the constant
inputs
in the configuration object insrc/config/index.ts
file
import { inputs } from './inputs'
export default {
inputs
}
The general configuration is then put in the entry point