-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocumented_xinput_modkey.ini
326 lines (287 loc) · 11.3 KB
/
documented_xinput_modkey.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
;;
;; This is the main configuration file for Xinput Modkey Filter DLL.
;; It is intended to be located in the same directoriy
;; the file "xinput_modkey.dll" is in.
;; Its name must be set to "xinput_modkey.ini".
;;
;; This is the documented version. Tf the name is different, renam it to "xinput_modkey.ini".
;;
;; [s_main]
;; Section with global settings.
;;
[s_main]
;; bEnforceAPIDeadzones = 1|0
;; If set, applies standard dedzones on analog inputs that are
;; passed back to the application. Corresponds to both thumbsticks and both triggers.
;; Deadzone values are taken from the Xinput API.
;;
bEnforceAPIDeadzones = 0
;; bADZReinterpolate = 1|0
;; If set and If using 'bEnforceAPIDeadzones', this causes inputs to be re-interpolated.
;; I.e. they're being blended from range 20%-100%, to values in range 0%-100%.
;;
bADZReinterpolate = 0
;; szXinputDllName = eDAuto | <name-of-file>
;; If not automatic, name of the Xinput DLL file that is to be loaded and examined.
;; It's recommended to use automatic setting ("eDAuto" (or empty)).
;; If specyfying file, its name must depend on the Xinput version
;; the application is using. This is usually one of following:
;; "xinput1_3.dll", "Xinput1_1.dll", "Xinput1_2.dll", "Xinput1_4.dll" or "Xinput9_1_0.dll".
;;
;szXinputDllName = eDAuto
;; szGlobalSuppress = <button-names>
;; Specify button names that are filtererd out and never send back to the application.
;; Note that buttons blocked here can still be used as modkeys, hotkeys, etc.
;; Comma character must be used as a separator.
;; Note that buttons can be also suppressed by:
;; 1. 'bSuppress' variable of the [s_modkey:#] section.
;; 2. 'szSuppress' variable of the [s_routine:#] section.
;;
;szGlobalSuppress = LEFT,RIGHT,UP,DOWN
;; bKeysUseSC = 1|0
;; Corresponds to how keyboard input is simulated and how is send to the application.
;; Should be set to 1 for all applications that use Direct Input to read keyboard.
;; When set, internally, scan-codes are used.
;;
bKeysUseSC = 1
;; bKeysUseWM = 1|0
;;
;;
;;bKeysUseWM = 0
;; bNoStartupSnd = 0|1
;; If set, disables startup sound.
;;
bNoStartupSnd = 0
;; szReinitHotkey = <button-names>
;; Hotkey to re-read and reinit this INI configuration file.
;; By default, set to following gamepad buttons: LSh+RSh+BACK+Y (Left shoulder, Right shoulder, Back and Y).
;; When triggered, the whole INI file is read again and settings are updated.
;; To disable, set its value to 'disable'.
;; If parsed successfully, plays the system asterisk notification.
;;
;szReinitHotkey = LSh+RSh+BACK+B
;szReinitHotkey = disable
;; [s_internal_xinput]
;; Section for internally enabled Xinput.
;; If the application does not use Xinput this can be used to generate
;; keyboard keys or simulate mouse motion. Note that this cannot be used to simulate
;; gamepad if the application is using Direct Input.
;; Do not use this if application is already using Xinput.
;;
[s_internal_xinput]
;; bXiEnabled = 1|0
;; If set, enables internal Xinput.
;;
bXiEnabled = 0
;; fThreadSleepMs = <float>
;; Interval telling how often to scan gamepad for the user input.
;; Value 16.666 yields 60 times per second read intervals.
;;
fThreadSleepMs = 16.666
;; [s_routine:0]
;; Routine section name.
;; Each must start with the "s_routine:" text and be followed by
;; user defined number (decimal value, typically 0-9000000).
;; Eg. "[s_routine:0]", "[s_routine:1]", "[s_routine:2]", and so on.
;; Instead of consecutive numbers, using random number that is
;; unique across the whole INI file is also recommended.
;;
[s_routine:0]
;; szHotkey
;; Required. Hotkey that triggers this routine, activates it.
;; Combination of one or more button and/or modkey names.
;; Use the plus character as separator ('+').
;; See "Gamepad Button Names" below for a list of
;; gamepad button names. Can be, for example, X, LTr or START.
;;
szHotkey = Mod0+X
;; szHold
;; Required. Button names that are activelly held, i.e. simulated.
;; Comma character must be used as separator.
;; In addition to gamepad button names, this list can include keyboard key
;; and mouse button names.
;;
szHold = START,m1
;; szSuppress
;; Optional. Button names to suppress, not send to the application,
;; when this routine is active.
;; Comma character must be used as separator.
;;
szSuppress = X,LTr
;; bHExclusive = 1|0
;; Optional. If set, hotkey gets activated only when all other gamepad buttons
;; are not held down.
;;
bHExclusive = 0
;; szAutoRepeat = millisec[,millisec]
;; Optional. Configure auto-repeat of gamepad buttons that are being held
;; (specified in the 'szHold' entry above.)
;; Value in milliseconds of how long to keep button pressed down
;; and how long released (1000 = 1 second).
;; If set to two values, the second one stands for the released time.
;; Set it to empty to disable auto repeat.
;; Auto repeat currently can be used only with gamepad buttons.
;;
;szAutoRepeat =
;szAutoRepeat = 32,32
;; bRDisabled = 0|1
;; If set to 1 then this routine is disabled.
;;
bRDisabled = 0
;; [s_routine:2]
;; Complete routine section example.
;; Converts gamepad button UP into F8 key.
;;
[s_routine:2]
szHotkey = UP
szSuppress = UP
szHold = F8
bHExclusive = 0
;; [s_routine:3]
;; Complete routine section example.
;; Specifies macro that simulates few consecutive button actions.
;;
[s_routine:3]
szHotkey = START+B
bHExclusive = 1
;; szMacroScr = <TEXT>
;; Macro as a mini script that lists buttons and time intervals.
;; List of comma separated items. Each can be either a button name or a wait time (interval).
;; Button followed by the "+" character stands for the input-down (button press).
;; Button followed by the "-" character stands for the input-up (button release).
;; As a result, the particular button is simulated as held untill it is released (by the input-up action or by the macro end).
;; Every item that starts with the "w" letter followed by a value is a wait time (interval) in milliseconds (1 ms = 0.001 seconds).
;;
;; Macro below holds buttons X and Y for 1 second ("w1000"),
;; then quickly clicks the UP button 3 times.
;;
szMacroScr = X+,Y+,w1000,X-,Y-,UP+,w100,UP-,w100,UP+,w100,UP-,w100,UP+,w100,UP-
;; szMBubbleAction = nothing|restart|stop
;; Specify what to do when macro hotkey is activated again, while running.
;; By default, nothing is done.
;; "restart" - resets, runs the macro from begin.
;; "stop" - stops the macro.
;;
;szMBubbleAction = nothing
szMBubbleAction = stop
;; bMBAsterisk = 0|1
;; bMEAsterisk = 0|1
;; If set to 1, plays the system asteris notifiation sound.
;; First variable enables it when the macro begins and second when ends.
;;
bMBAsterisk = 0
bMEAsterisk = 1
;; [s_modkey:0]
;; Modkey section.
;; If using routines is not enough, modkeys can provide few more functions.
;; Typically, can be used to assign a name to the button and then
;; use that name inside the routine, instead.
;; Can be also used to hide real inputs from the application.
;;
;; Setting "bSuppress" to 1 will make application to never see the physical button pressed.
;; Instead, buttons send will be those defined in the routine.
;;
;; Example:
;; * define Y as a modkey (bSuppress=1).
;; * define Y+X to send the A button - the application doesn't know that the Y is pressed.
;; * define Y+B to send the Y button - only now the application "thinks" that the Y is pressed.
;;
[s_modkey:0]
;; szButton
;; Required. Specify gamepad button to use. Must be single button name.
;;
szButton = LTr
;; szName = <text>
;; Required. Set unique name of this modkey, for later use in routines.
;;
szName = Mod0
;; bSuppress = 1|0
;; Optional. If set, button specified in 'szButton' is suppressed.
;; I.e. it is filtered out and not send to the application.
;;
bSuppress = 0
;; nFloor = <percentage> | <fraction> | <decimal>
;; Optional. Specify lower, floor, value at which this modkey is activated.
;; This is only for buttons that generate analog inputs, eg. Left Trigger.
;; If not set, acts as if set to 0%. Note that deadzones may be used,
;; depending on global settings.
;;
nFloor = 10%
;; nCeil = <percentage> | <fraction> | <decimal>
;; Optional. Specify upper value at which this modkey is considered not active.
;; This corresponds to 'nFloor'. If not set, acts as if set to 100%.
;;
nCeil =
;; [s_input_tr:0]
;; Input translation section.
;; Can be used, for example, to define mouse navigation with gamepad thumbstick.
;;
[s_input_tr:0]
;; szInputs
;; Required. List of button names that are taken as inputs, one or more.
;; How many to specify depends on 'eTIMode' setting.
;; Comma character must be used as separator.
;;
;;
szInputs = LSYPlus,LSXPlus,LSYMinus,LSXMinus
;; szHotkey2
;; Optional. Hotkey and button list. Format is the same as 'szHotkey'
;; value of the "[s_routine:0]" section.
;; If 'szHotkey2' is not specified, this input translation is active all the time.
;;
szHotkey2 =
;; eTIMode
;; Required. Translation mode to use.
;; Currently, can be set only to 'eMouseMotion'.
;;
eTIMode = eMouseMotion
;; nMovementPerSec
;; If mode is set to 'eMouseMotion', this sepcifies the mouse motion speed.
;; Unit is pixels per second.
;;
nMovementPerSec = 512
;;
;; Gamepad Button Names
;; --------------------------------
;; A, B, X, Y,
;; LTh, <-- Left Thumbstick pressed down
;; RTh,
;; LTr, <-- Left Trigger
;; RTr,
;; START, BACK,
;; UP, DOWN, LEFT, RIGHT, <-- D-pad directional buttons
;; LSh, <-- Left Shoulder
;; RSh,
;; LSXPlus, <-- Left Stick X Axis in its plus direction
;; LSXMinus,
;; LSYPlus, LSYMinus, RSXPlus, RSXMinus, RSYPlus, RSYMinus,
;;
;;
;; Keyboard Key Names
;; ----------------------------------------
;; Textual key names, eg. "a", "Esc"; or decimal values using k# format,
;; eg. "k65", "k112".
;;
;;
;; Example key names:
;;
;; a, b, C, z, Z, 1, 2, 3, F1, F12, n0, n9,
;; backspace, bs, back, tab, Enter,
;; Shift, CapsLock, Escape, Esc,
;; LeftArrow, LArrow, DownArrow, DArrow, PgUp, ScrollLock, SHIFT, LWIN, WIN, APPS,
;; Ctrl, MENU, ALT, ADD, Mul
;;
;; 65, 112, <-- Keys with decimal VK codes 65 and 112, respectivelly, 'a' and 'F1'.
;; Value must be at least 2 digits long. eg. instead of 9 use 09.
;;
;; Reference:
;; Virtual-Key Codes - Windows applications | Microsoft Docs
;; https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes
;; - Remember to convert values from hexadecimal to decimal format.
;;
;;
;; Mouse button names
;; -----------------------------
;; m1, m2, m3, ...
;;
;;