You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://github.com/CCDirectLink/input-api/releases)
4
+
5
+
This mod allows other mods to add rebindable key bindings.
6
+
7
+
## Guide for modders
8
+
9
+
Adding your input actions is incredibly simple. Firstly, you have to define an option in `sc.OPTIONS_DEFINITION` (as you normally would) which will be written to the save file and show up in the "Controls" tab:
10
+
11
+
```javascript
12
+
// it is recommended to do this in either `postload` or `prestart`
13
+
sc.OPTIONS_DEFINITION['keys-jump'] = {
14
+
type:'CONTROLS',
15
+
init: { key1:ig.KEY.CTRL, key2:undefined },
16
+
cat:sc.OPTION_CATEGORY.CONTROLS,
17
+
};
18
+
```
19
+
20
+
And after that you have to add a localized label for your key binding:
21
+
22
+
```javascript
23
+
// there are other ways to do this, but here is the simplest
0 commit comments