dualsense-ts 2.0.13 → 2.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +31 -29
  2. package/dist/dualsense.d.ts.map +1 -1
  3. package/dist/dualsense.js +13 -3
  4. package/dist/dualsense.js.map +1 -1
  5. package/dist/elements/analog.js +2 -2
  6. package/dist/elements/increment.d.ts +6 -0
  7. package/dist/elements/increment.d.ts.map +1 -0
  8. package/dist/elements/increment.js +15 -0
  9. package/dist/elements/increment.js.map +1 -0
  10. package/dist/elements/index.d.ts +2 -0
  11. package/dist/elements/index.d.ts.map +1 -1
  12. package/dist/elements/index.js +2 -0
  13. package/dist/elements/index.js.map +1 -1
  14. package/dist/elements/touch.d.ts +13 -0
  15. package/dist/elements/touch.d.ts.map +1 -0
  16. package/dist/elements/touch.js +22 -0
  17. package/dist/elements/touch.js.map +1 -0
  18. package/dist/elements/touchpad.d.ts +3 -6
  19. package/dist/elements/touchpad.d.ts.map +1 -1
  20. package/dist/elements/touchpad.js +4 -11
  21. package/dist/elements/touchpad.js.map +1 -1
  22. package/dist/elements/unisense.d.ts.map +1 -1
  23. package/dist/elements/unisense.js +2 -2
  24. package/dist/elements/unisense.js.map +1 -1
  25. package/dist/hid/dualsense_hid.d.ts +1 -1
  26. package/dist/hid/dualsense_hid.d.ts.map +1 -1
  27. package/dist/hid/dualsense_hid.js +7 -7
  28. package/dist/hid/dualsense_hid.js.map +1 -1
  29. package/dist/input.d.ts +2 -2
  30. package/dist/input.d.ts.map +1 -1
  31. package/dist/input.js +4 -4
  32. package/dist/input.js.map +1 -1
  33. package/docs/Analog.md +90 -81
  34. package/docs/AnalogParams.md +7 -7
  35. package/docs/Axis.md +79 -72
  36. package/docs/Brightness.md +3 -3
  37. package/docs/CommandScopeA.md +7 -7
  38. package/docs/CommandScopeB.md +6 -6
  39. package/docs/Dpad.md +81 -74
  40. package/docs/DpadParams.md +8 -8
  41. package/docs/DualSenseCommand.md +45 -45
  42. package/docs/Dualsense.md +90 -83
  43. package/docs/DualsenseHID.md +42 -47
  44. package/docs/DualsenseHIDState.md +41 -41
  45. package/docs/DualsenseParams.md +17 -17
  46. package/docs/Exports.md +19 -16
  47. package/docs/Haptic.md +1 -1
  48. package/docs/Home.md +31 -29
  49. package/docs/Increment.md +1554 -0
  50. package/docs/Indicator.md +2 -2
  51. package/docs/Input.md +79 -70
  52. package/docs/InputId.md +41 -41
  53. package/docs/InputParams.md +4 -4
  54. package/docs/LedOptions.md +4 -4
  55. package/docs/Momentary.md +77 -70
  56. package/docs/Motion.md +2 -2
  57. package/docs/Mute.md +79 -72
  58. package/docs/PlayerID.md +5 -5
  59. package/docs/PulseOptions.md +3 -3
  60. package/docs/Touch.md +1781 -0
  61. package/docs/Touchpad.md +94 -120
  62. package/docs/Trigger.md +82 -75
  63. package/docs/TriggerMode.md +10 -10
  64. package/docs/Unisense.md +81 -74
  65. package/docs/UnisenseParams.md +7 -7
  66. package/package.json +2 -2
  67. package/src/dualsense.ts +22 -4
  68. package/src/elements/analog.ts +2 -2
  69. package/src/elements/increment.ts +9 -0
  70. package/src/elements/index.ts +2 -0
  71. package/src/elements/touch.ts +16 -0
  72. package/src/elements/touchpad.ts +9 -23
  73. package/src/elements/unisense.ts +4 -2
  74. package/src/hid/dualsense_hid.ts +13 -7
  75. package/src/input.ts +8 -4
package/docs/Unisense.md CHANGED
@@ -91,7 +91,7 @@
91
91
 
92
92
  #### Defined in
93
93
 
94
- [src/elements/unisense.ts:22](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L22)
94
+ [src/elements/unisense.ts:22](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L22)
95
95
 
96
96
  ## Properties
97
97
 
@@ -120,7 +120,7 @@
120
120
 
121
121
  #### Defined in
122
122
 
123
- [src/input.ts:124](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L124)
123
+ [src/input.ts:128](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L128)
124
124
 
125
125
  ___
126
126
 
@@ -134,7 +134,7 @@ ___
134
134
 
135
135
  #### Defined in
136
136
 
137
- [src/input.ts:158](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L158)
137
+ [src/input.ts:162](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L162)
138
138
 
139
139
  ___
140
140
 
@@ -148,7 +148,7 @@ ___
148
148
 
149
149
  #### Defined in
150
150
 
151
- [src/input.ts:153](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L153)
151
+ [src/input.ts:157](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L157)
152
152
 
153
153
  ___
154
154
 
@@ -162,7 +162,7 @@ ___
162
162
 
163
163
  #### Defined in
164
164
 
165
- [src/input.ts:150](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L150)
165
+ [src/input.ts:154](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L154)
166
166
 
167
167
  ___
168
168
 
@@ -176,7 +176,7 @@ ___
176
176
 
177
177
  #### Defined in
178
178
 
179
- [src/input.ts:156](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L156)
179
+ [src/input.ts:160](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L160)
180
180
 
181
181
  ___
182
182
 
@@ -186,7 +186,7 @@ ___
186
186
 
187
187
  #### Defined in
188
188
 
189
- [src/elements/unisense.ts:19](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L19)
189
+ [src/elements/unisense.ts:19](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L19)
190
190
 
191
191
  ___
192
192
 
@@ -196,7 +196,7 @@ ___
196
196
 
197
197
  #### Defined in
198
198
 
199
- [src/elements/unisense.ts:18](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L18)
199
+ [src/elements/unisense.ts:18](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L18)
200
200
 
201
201
  ___
202
202
 
@@ -206,7 +206,7 @@ ___
206
206
 
207
207
  #### Defined in
208
208
 
209
- [src/elements/unisense.ts:20](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L20)
209
+ [src/elements/unisense.ts:20](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L20)
210
210
 
211
211
  ___
212
212
 
@@ -220,7 +220,7 @@ ___
220
220
 
221
221
  #### Defined in
222
222
 
223
- [src/input.ts:58](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L58)
223
+ [src/input.ts:58](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L58)
224
224
 
225
225
  ___
226
226
 
@@ -234,7 +234,7 @@ ___
234
234
 
235
235
  #### Defined in
236
236
 
237
- [src/input.ts:61](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L61)
237
+ [src/input.ts:61](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L61)
238
238
 
239
239
  ___
240
240
 
@@ -248,7 +248,7 @@ ___
248
248
 
249
249
  #### Defined in
250
250
 
251
- [src/input.ts:64](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L64)
251
+ [src/input.ts:64](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L64)
252
252
 
253
253
  ___
254
254
 
@@ -262,7 +262,7 @@ ___
262
262
 
263
263
  #### Defined in
264
264
 
265
- [src/elements/unisense.ts:15](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L15)
265
+ [src/elements/unisense.ts:15](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L15)
266
266
 
267
267
  ___
268
268
 
@@ -276,7 +276,7 @@ ___
276
276
 
277
277
  #### Defined in
278
278
 
279
- [src/input.ts:67](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L67)
279
+ [src/input.ts:67](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L67)
280
280
 
281
281
  ___
282
282
 
@@ -286,7 +286,7 @@ ___
286
286
 
287
287
  #### Defined in
288
288
 
289
- [src/elements/unisense.ts:17](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L17)
289
+ [src/elements/unisense.ts:17](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L17)
290
290
 
291
291
  ___
292
292
 
@@ -300,7 +300,7 @@ ___
300
300
 
301
301
  #### Defined in
302
302
 
303
- node_modules/@types/node/events.d.ts:301
303
+ node_modules/@types/node/events.d.ts:291
304
304
 
305
305
  ___
306
306
 
@@ -316,7 +316,7 @@ Sets or gets the default captureRejection value for all emitters.
316
316
 
317
317
  #### Defined in
318
318
 
319
- node_modules/@types/node/events.d.ts:306
319
+ node_modules/@types/node/events.d.ts:296
320
320
 
321
321
  ___
322
322
 
@@ -330,7 +330,7 @@ ___
330
330
 
331
331
  #### Defined in
332
332
 
333
- node_modules/@types/node/events.d.ts:307
333
+ node_modules/@types/node/events.d.ts:297
334
334
 
335
335
  ___
336
336
 
@@ -352,7 +352,7 @@ regular `'error'` listener is installed.
352
352
 
353
353
  #### Defined in
354
354
 
355
- node_modules/@types/node/events.d.ts:300
355
+ node_modules/@types/node/events.d.ts:290
356
356
 
357
357
  ## Accessors
358
358
 
@@ -370,7 +370,7 @@ Input.\_\_@toStringTag@66
370
370
 
371
371
  #### Defined in
372
372
 
373
- [src/input.ts:145](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L145)
373
+ [src/input.ts:149](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L149)
374
374
 
375
375
  ___
376
376
 
@@ -388,7 +388,7 @@ Input.active
388
388
 
389
389
  #### Defined in
390
390
 
391
- [src/elements/unisense.ts:39](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L39)
391
+ [src/elements/unisense.ts:41](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L41)
392
392
 
393
393
  ## Methods
394
394
 
@@ -409,7 +409,7 @@ And decide if this is the root Input.
409
409
 
410
410
  #### Defined in
411
411
 
412
- [src/input.ts:164](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L164)
412
+ [src/input.ts:168](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L168)
413
413
 
414
414
  ___
415
415
 
@@ -434,7 +434,7 @@ ___
434
434
 
435
435
  #### Defined in
436
436
 
437
- [src/input.ts:186](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L186)
437
+ [src/input.ts:190](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L190)
438
438
 
439
439
  ___
440
440
 
@@ -459,7 +459,7 @@ ___
459
459
 
460
460
  #### Defined in
461
461
 
462
- [src/input.ts:190](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L190)
462
+ [src/input.ts:194](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L194)
463
463
 
464
464
  ___
465
465
 
@@ -477,7 +477,7 @@ ___
477
477
 
478
478
  #### Defined in
479
479
 
480
- [src/input.ts:182](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L182)
480
+ [src/input.ts:186](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L186)
481
481
 
482
482
  ___
483
483
 
@@ -508,7 +508,7 @@ ___
508
508
 
509
509
  #### Defined in
510
510
 
511
- [src/input.ts:195](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L195)
511
+ [src/input.ts:199](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L199)
512
512
 
513
513
  ___
514
514
 
@@ -534,7 +534,7 @@ Update the input's state and trigger all necessary callbacks.
534
534
 
535
535
  #### Defined in
536
536
 
537
- [src/input.ts:211](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L211)
537
+ [src/input.ts:215](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L215)
538
538
 
539
539
  ___
540
540
 
@@ -552,7 +552,7 @@ ___
552
552
 
553
553
  #### Defined in
554
554
 
555
- [src/input.ts:135](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L135)
555
+ [src/input.ts:139](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L139)
556
556
 
557
557
  ___
558
558
 
@@ -570,7 +570,7 @@ ___
570
570
 
571
571
  #### Defined in
572
572
 
573
- [src/input.ts:127](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L127)
573
+ [src/input.ts:131](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L131)
574
574
 
575
575
  ___
576
576
 
@@ -594,7 +594,7 @@ ___
594
594
 
595
595
  #### Defined in
596
596
 
597
- [src/input.ts:139](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L139)
597
+ [src/input.ts:143](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L143)
598
598
 
599
599
  ___
600
600
 
@@ -623,7 +623,7 @@ Alias for `emitter.on(eventName, listener)`.
623
623
 
624
624
  #### Defined in
625
625
 
626
- node_modules/@types/node/events.d.ts:327
626
+ node_modules/@types/node/events.d.ts:317
627
627
 
628
628
  ___
629
629
 
@@ -648,7 +648,7 @@ ___
648
648
 
649
649
  #### Defined in
650
650
 
651
- [src/input.ts:44](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L44)
651
+ [src/input.ts:44](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L44)
652
652
 
653
653
  ___
654
654
 
@@ -684,7 +684,7 @@ console.log(myEE.eventNames());
684
684
 
685
685
  #### Defined in
686
686
 
687
- node_modules/@types/node/events.d.ts:642
687
+ node_modules/@types/node/events.d.ts:632
688
688
 
689
689
  ___
690
690
 
@@ -707,7 +707,7 @@ set by `emitter.setMaxListeners(n)` or defaults to [defaultMaxListeners](../wiki
707
707
 
708
708
  #### Defined in
709
709
 
710
- node_modules/@types/node/events.d.ts:499
710
+ node_modules/@types/node/events.d.ts:489
711
711
 
712
712
  ___
713
713
 
@@ -735,7 +735,7 @@ Returns the number of listeners listening to the event named `eventName`.
735
735
 
736
736
  #### Defined in
737
737
 
738
- node_modules/@types/node/events.d.ts:589
738
+ node_modules/@types/node/events.d.ts:579
739
739
 
740
740
  ___
741
741
 
@@ -771,16 +771,22 @@ console.log(util.inspect(server.listeners('connection')));
771
771
 
772
772
  #### Defined in
773
773
 
774
- node_modules/@types/node/events.d.ts:512
774
+ node_modules/@types/node/events.d.ts:502
775
775
 
776
776
  ___
777
777
 
778
778
  ### next
779
779
 
780
- ▸ **next**(): `Promise`<`IteratorResult`<[`Unisense`](../wiki/Unisense), `any`\>\>
780
+ ▸ **next**(`type?`): `Promise`<`IteratorResult`<[`Unisense`](../wiki/Unisense), `any`\>\>
781
781
 
782
782
  Resolves on the next change to this input's state.
783
783
 
784
+ #### Parameters
785
+
786
+ | Name | Type | Default value |
787
+ | :------ | :------ | :------ |
788
+ | `type` | ``"change"`` \| ``"press"`` \| ``"release"`` | `"change"` |
789
+
784
790
  #### Returns
785
791
 
786
792
  `Promise`<`IteratorResult`<[`Unisense`](../wiki/Unisense), `any`\>\>
@@ -791,7 +797,7 @@ Resolves on the next change to this input's state.
791
797
 
792
798
  #### Defined in
793
799
 
794
- [src/input.ts:78](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L78)
800
+ [src/input.ts:78](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L78)
795
801
 
796
802
  ___
797
803
 
@@ -820,7 +826,7 @@ Alias for `emitter.removeListener()`.
820
826
 
821
827
  #### Defined in
822
828
 
823
- node_modules/@types/node/events.d.ts:472
829
+ node_modules/@types/node/events.d.ts:462
824
830
 
825
831
  ___
826
832
 
@@ -845,7 +851,7 @@ ___
845
851
 
846
852
  #### Defined in
847
853
 
848
- [src/input.ts:37](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L37)
854
+ [src/input.ts:37](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L37)
849
855
 
850
856
  ___
851
857
 
@@ -896,7 +902,7 @@ myEE.emit('foo');
896
902
 
897
903
  #### Defined in
898
904
 
899
- node_modules/@types/node/events.d.ts:387
905
+ node_modules/@types/node/events.d.ts:377
900
906
 
901
907
  ___
902
908
 
@@ -936,7 +942,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
936
942
 
937
943
  #### Defined in
938
944
 
939
- node_modules/@types/node/events.d.ts:607
945
+ node_modules/@types/node/events.d.ts:597
940
946
 
941
947
  ___
942
948
 
@@ -974,16 +980,22 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
974
980
 
975
981
  #### Defined in
976
982
 
977
- node_modules/@types/node/events.d.ts:623
983
+ node_modules/@types/node/events.d.ts:613
978
984
 
979
985
  ___
980
986
 
981
987
  ### promise
982
988
 
983
- ▸ **promise**(): `Promise`<[`Unisense`](../wiki/Unisense)\>
989
+ ▸ **promise**(`type?`): `Promise`<[`Unisense`](../wiki/Unisense)\>
984
990
 
985
991
  Resolves on the next change to this input's state.
986
992
 
993
+ #### Parameters
994
+
995
+ | Name | Type | Default value |
996
+ | :------ | :------ | :------ |
997
+ | `type` | ``"change"`` \| ``"press"`` \| ``"release"`` | `"change"` |
998
+
987
999
  #### Returns
988
1000
 
989
1001
  `Promise`<[`Unisense`](../wiki/Unisense)\>
@@ -994,7 +1006,7 @@ Resolves on the next change to this input's state.
994
1006
 
995
1007
  #### Defined in
996
1008
 
997
- [src/input.ts:89](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L89)
1009
+ [src/input.ts:91](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L91)
998
1010
 
999
1011
  ___
1000
1012
 
@@ -1047,7 +1059,7 @@ emitter.emit('log');
1047
1059
 
1048
1060
  #### Defined in
1049
1061
 
1050
- node_modules/@types/node/events.d.ts:542
1062
+ node_modules/@types/node/events.d.ts:532
1051
1063
 
1052
1064
  ___
1053
1065
 
@@ -1081,7 +1093,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1081
1093
 
1082
1094
  #### Defined in
1083
1095
 
1084
- node_modules/@types/node/events.d.ts:483
1096
+ node_modules/@types/node/events.d.ts:473
1085
1097
 
1086
1098
  ___
1087
1099
 
@@ -1185,7 +1197,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1185
1197
 
1186
1198
  #### Defined in
1187
1199
 
1188
- node_modules/@types/node/events.d.ts:467
1200
+ node_modules/@types/node/events.d.ts:457
1189
1201
 
1190
1202
  ___
1191
1203
 
@@ -1218,7 +1230,7 @@ Returns a reference to the `EventEmitter`, so that calls can be chained.
1218
1230
 
1219
1231
  #### Defined in
1220
1232
 
1221
- node_modules/@types/node/events.d.ts:493
1233
+ node_modules/@types/node/events.d.ts:483
1222
1234
 
1223
1235
  ___
1224
1236
 
@@ -1238,7 +1250,7 @@ Render a convenient debugging string.
1238
1250
 
1239
1251
  #### Defined in
1240
1252
 
1241
- [src/input.ts:98](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L98)
1253
+ [src/input.ts:102](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L102)
1242
1254
 
1243
1255
  ___
1244
1256
 
@@ -1290,7 +1302,7 @@ const { getEventListeners, EventEmitter } = require('events');
1290
1302
 
1291
1303
  #### Defined in
1292
1304
 
1293
- node_modules/@types/node/events.d.ts:270
1305
+ node_modules/@types/node/events.d.ts:262
1294
1306
 
1295
1307
  ___
1296
1308
 
@@ -1330,7 +1342,7 @@ console.log(listenerCount(myEmitter, 'event'));
1330
1342
 
1331
1343
  #### Defined in
1332
1344
 
1333
- node_modules/@types/node/events.d.ts:242
1345
+ node_modules/@types/node/events.d.ts:234
1334
1346
 
1335
1347
  ___
1336
1348
 
@@ -1414,7 +1426,7 @@ that iterates `eventName` events emitted by the `emitter`
1414
1426
 
1415
1427
  #### Defined in
1416
1428
 
1417
- node_modules/@types/node/events.d.ts:221
1429
+ node_modules/@types/node/events.d.ts:217
1418
1430
 
1419
1431
  ___
1420
1432
 
@@ -1544,7 +1556,7 @@ node_modules/@types/node/events.d.ts:157
1544
1556
 
1545
1557
  #### Defined in
1546
1558
 
1547
- node_modules/@types/node/events.d.ts:162
1559
+ node_modules/@types/node/events.d.ts:158
1548
1560
 
1549
1561
  ___
1550
1562
 
@@ -1552,31 +1564,26 @@ ___
1552
1564
 
1553
1565
  ▸ `Static` **setMaxListeners**(`n?`, ...`eventTargets`): `void`
1554
1566
 
1555
- By default `EventEmitter`s will print a warning if more than `10` listeners are
1556
- added for a particular event. This is a useful default that helps finding
1557
- memory leaks. The `EventEmitter.setMaxListeners()` method allows the default limit to be
1558
- modified (if eventTargets is empty) or modify the limit specified in every `EventTarget` | `EventEmitter` passed as arguments.
1559
- The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
1560
-
1561
1567
  ```js
1562
- EventEmitter.setMaxListeners(20);
1563
- // Equivalent to
1564
- EventEmitter.defaultMaxListeners = 20;
1565
-
1566
- const eventTarget = new EventTarget();
1567
- // Only way to increase limit for `EventTarget` instances
1568
- // as these doesn't expose its own `setMaxListeners` method
1569
- EventEmitter.setMaxListeners(20, eventTarget);
1568
+ const {
1569
+ setMaxListeners,
1570
+ EventEmitter
1571
+ } = require('events');
1572
+
1573
+ const target = new EventTarget();
1574
+ const emitter = new EventEmitter();
1575
+
1576
+ setMaxListeners(5, target, emitter);
1570
1577
  ```
1571
1578
 
1572
- **`since`** v15.3.0, v14.17.0
1579
+ **`since`** v15.4.0
1573
1580
 
1574
1581
  #### Parameters
1575
1582
 
1576
- | Name | Type |
1577
- | :------ | :------ |
1578
- | `n?` | `number` |
1579
- | `...eventTargets` | (`EventEmitter` \| `DOMEventTarget`)[] |
1583
+ | Name | Type | Description |
1584
+ | :------ | :------ | :------ |
1585
+ | `n?` | `number` | A non-negative number. The maximum number of listeners per `EventTarget` event. |
1586
+ | `...eventTargets` | (`EventEmitter` \| `DOMEventTarget`)[] | - |
1580
1587
 
1581
1588
  #### Returns
1582
1589
 
@@ -1588,4 +1595,4 @@ EventEmitter.setMaxListeners(20, eventTarget);
1588
1595
 
1589
1596
  #### Defined in
1590
1597
 
1591
- node_modules/@types/node/events.d.ts:290
1598
+ node_modules/@types/node/events.d.ts:280
@@ -26,7 +26,7 @@
26
26
 
27
27
  #### Defined in
28
28
 
29
- [src/elements/unisense.ts:10](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L10)
29
+ [src/elements/unisense.ts:10](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L10)
30
30
 
31
31
  ___
32
32
 
@@ -36,7 +36,7 @@ ___
36
36
 
37
37
  #### Defined in
38
38
 
39
- [src/elements/unisense.ts:9](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L9)
39
+ [src/elements/unisense.ts:9](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L9)
40
40
 
41
41
  ___
42
42
 
@@ -50,7 +50,7 @@ ___
50
50
 
51
51
  #### Defined in
52
52
 
53
- [src/input.ts:6](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L6)
53
+ [src/input.ts:6](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L6)
54
54
 
55
55
  ___
56
56
 
@@ -64,7 +64,7 @@ ___
64
64
 
65
65
  #### Defined in
66
66
 
67
- [src/input.ts:5](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L5)
67
+ [src/input.ts:5](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L5)
68
68
 
69
69
  ___
70
70
 
@@ -78,7 +78,7 @@ ___
78
78
 
79
79
  #### Defined in
80
80
 
81
- [src/input.ts:8](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L8)
81
+ [src/input.ts:8](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L8)
82
82
 
83
83
  ___
84
84
 
@@ -92,7 +92,7 @@ ___
92
92
 
93
93
  #### Defined in
94
94
 
95
- [src/input.ts:7](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/input.ts#L7)
95
+ [src/input.ts:7](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/input.ts#L7)
96
96
 
97
97
  ___
98
98
 
@@ -102,4 +102,4 @@ ___
102
102
 
103
103
  #### Defined in
104
104
 
105
- [src/elements/unisense.ts:8](https://github.com/nsfm/dualsense-ts/blob/29d69a7/src/elements/unisense.ts#L8)
105
+ [src/elements/unisense.ts:8](https://github.com/nsfm/dualsense-ts/blob/04aff39/src/elements/unisense.ts#L8)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dualsense-ts",
3
- "version": "2.0.13",
3
+ "version": "2.1.30",
4
4
  "description": "A natural interface for your DualSense controller, with Typescript",
5
5
  "keywords": [
6
6
  "dualsense",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/jest": "^27.5.0",
54
- "@types/node": "^17.0.32",
54
+ "@types/node": "^18.0.0",
55
55
  "@types/node-hid": "^1.3.1",
56
56
  "@typescript-eslint/eslint-plugin": "^5.23.0",
57
57
  "@typescript-eslint/parser": "^5.23.0",
package/src/dualsense.ts CHANGED
@@ -136,27 +136,45 @@ export class Dualsense extends Input<Dualsense> {
136
136
  if (!this.hid) return;
137
137
  this.ps[InputSet](this.hid.state[InputId.Playstation]);
138
138
  this.options[InputSet](this.hid.state[InputId.Options]);
139
+ this.create[InputSet](this.hid.state[InputId.Create]);
140
+
139
141
  this.mute[InputSet](this.hid.state[InputId.Mute]);
140
142
  this.mute.status[InputSet](this.hid.state[InputId.Status]);
141
- this.create[InputSet](this.hid.state[InputId.Create]);
143
+
142
144
  this.triangle[InputSet](this.hid.state[InputId.Triangle]);
143
145
  this.circle[InputSet](this.hid.state[InputId.Circle]);
144
146
  this.cross[InputSet](this.hid.state[InputId.Cross]);
145
147
  this.square[InputSet](this.hid.state[InputId.Square]);
148
+
146
149
  this.dpad.up[InputSet](this.hid.state[InputId.Up]);
147
150
  this.dpad.down[InputSet](this.hid.state[InputId.Down]);
148
151
  this.dpad.right[InputSet](this.hid.state[InputId.Right]);
149
152
  this.dpad.left[InputSet](this.hid.state[InputId.Left]);
153
+
150
154
  this.touchpad.button[InputSet](this.hid.state[InputId.TouchButton]);
155
+ this.touchpad.left.x[InputSet](this.hid.state[InputId.TouchX0]);
156
+ this.touchpad.left.y[InputSet](this.hid.state[InputId.TouchY0]);
157
+ this.touchpad.left.contact[InputSet](this.hid.state[InputId.TouchContact0]);
158
+ this.touchpad.left.tracker[InputSet](this.hid.state[InputId.TouchId0]);
159
+ this.touchpad.right.x[InputSet](this.hid.state[InputId.TouchX1]);
160
+ this.touchpad.right.y[InputSet](this.hid.state[InputId.TouchY1]);
161
+ this.touchpad.right.contact[InputSet](
162
+ this.hid.state[InputId.TouchContact1]
163
+ );
164
+ this.touchpad.right.tracker[InputSet](this.hid.state[InputId.TouchId1]);
165
+
151
166
  this.left.analog.x[InputSet](this.hid.state[InputId.LeftAnalogX]);
152
167
  this.left.analog.y[InputSet](this.hid.state[InputId.LeftAnalogY]);
153
- this.right.analog.x[InputSet](this.hid.state[InputId.RightAnalogX]);
154
- this.right.analog.y[InputSet](this.hid.state[InputId.RightAnalogY]);
168
+ this.left.bumper[InputSet](this.hid.state[InputId.LeftBumper]);
155
169
  this.left.trigger[InputSet](this.hid.state[InputId.LeftTrigger]);
156
- this.right.trigger[InputSet](this.hid.state[InputId.RightTrigger]);
157
170
  this.left.trigger.button[InputSet](
158
171
  this.hid.state[InputId.LeftTriggerButton]
159
172
  );
173
+
174
+ this.right.analog.x[InputSet](this.hid.state[InputId.RightAnalogX]);
175
+ this.right.analog.y[InputSet](this.hid.state[InputId.RightAnalogY]);
176
+ this.right.bumper[InputSet](this.hid.state[InputId.RightBumper]);
177
+ this.right.trigger[InputSet](this.hid.state[InputId.RightTrigger]);
160
178
  this.right.trigger.button[InputSet](
161
179
  this.hid.state[InputId.RightTriggerButton]
162
180
  );
@@ -32,10 +32,10 @@ export class Analog extends Input<Analog> {
32
32
  params?.button || { icon: "3", name: "Button" }
33
33
  );
34
34
  this.x = new Axis(
35
- params?.x || { icon: "↔", name: "X", threshold: (1 / 255) * 3 }
35
+ params?.x || { icon: "↔", name: "X", threshold: (1 / 128) * 3 }
36
36
  );
37
37
  this.y = new Axis(
38
- params?.y || { icon: "↕", name: "Y", threshold: (1 / 255) * 3 }
38
+ params?.y || { icon: "↕", name: "Y", threshold: (1 / 128) * 3 }
39
39
  );
40
40
  }
41
41
 
@@ -0,0 +1,9 @@
1
+ import { Input } from "../input";
2
+
3
+ export class Increment extends Input<number> {
4
+ public state: number = 0;
5
+
6
+ public get active(): boolean {
7
+ return false;
8
+ }
9
+ }