Skip to content

Commit 37f94d7

Browse files
author
Rene Damm
authored
FIX: Touch control scheme associations in default actions (#939).
1 parent f68a3a5 commit 37f94d7

File tree

2 files changed

+88
-44
lines changed

2 files changed

+88
-44
lines changed

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/DefaultInputActions.inputactions

Lines changed: 86 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@
6464
"isComposite": false,
6565
"isPartOfComposite": true
6666
},
67+
{
68+
"name": "up",
69+
"id": "8180e8bd-4097-4f4e-ab88-4523101a6ce9",
70+
"path": "<Keyboard>/upArrow",
71+
"interactions": "",
72+
"processors": "",
73+
"groups": ";Keyboard&Mouse",
74+
"action": "Move",
75+
"isComposite": false,
76+
"isPartOfComposite": true
77+
},
6778
{
6879
"name": "down",
6980
"id": "320bffee-a40b-4347-ac70-c210eb8bc73a",
@@ -76,9 +87,9 @@
7687
"isPartOfComposite": true
7788
},
7889
{
79-
"name": "left",
80-
"id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc",
81-
"path": "<Keyboard>/a",
90+
"name": "down",
91+
"id": "1c5327b5-f71c-4f60-99c7-4e737386f1d1",
92+
"path": "<Keyboard>/downArrow",
8293
"interactions": "",
8394
"processors": "",
8495
"groups": ";Keyboard&Mouse",
@@ -87,9 +98,9 @@
8798
"isPartOfComposite": true
8899
},
89100
{
90-
"name": "right",
91-
"id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400",
92-
"path": "<Keyboard>/d",
101+
"name": "left",
102+
"id": "d2581a9b-1d11-4566-b27d-b92aff5fabbc",
103+
"path": "<Keyboard>/a",
93104
"interactions": "",
94105
"processors": "",
95106
"groups": ";Keyboard&Mouse",
@@ -98,20 +109,20 @@
98109
"isPartOfComposite": true
99110
},
100111
{
101-
"name": "Arrows",
102-
"id": "12911854-7ef9-433a-abf6-8c5b3083e453",
103-
"path": "2DVector",
112+
"name": "left",
113+
"id": "2e46982e-44cc-431b-9f0b-c11910bf467a",
114+
"path": "<Keyboard>/leftArrow",
104115
"interactions": "",
105116
"processors": "",
106-
"groups": "",
117+
"groups": ";Keyboard&Mouse",
107118
"action": "Move",
108-
"isComposite": true,
109-
"isPartOfComposite": false
119+
"isComposite": false,
120+
"isPartOfComposite": true
110121
},
111122
{
112-
"name": "up",
113-
"id": "7393f231-7340-425a-bc46-e5ed77bce631",
114-
"path": "<Keyboard>/upArrow",
123+
"name": "right",
124+
"id": "fcfe95b8-67b9-4526-84b5-5d0bc98d6400",
125+
"path": "<Keyboard>/d",
115126
"interactions": "",
116127
"processors": "",
117128
"groups": ";Keyboard&Mouse",
@@ -120,9 +131,9 @@
120131
"isPartOfComposite": true
121132
},
122133
{
123-
"name": "down",
124-
"id": "6cbc0fe4-6202-44fa-ab64-513c4b47fc8e",
125-
"path": "<Keyboard>/downArrow",
134+
"name": "right",
135+
"id": "77bff152-3580-4b21-b6de-dcd0c7e41164",
136+
"path": "<Keyboard>/rightArrow",
126137
"interactions": "",
127138
"processors": "",
128139
"groups": ";Keyboard&Mouse",
@@ -131,26 +142,26 @@
131142
"isPartOfComposite": true
132143
},
133144
{
134-
"name": "left",
135-
"id": "786944cc-a886-40d2-81a7-05654f07c83c",
136-
"path": "<Keyboard>/leftArrow",
145+
"name": "",
146+
"id": "1635d3fe-58b6-4ba9-a4e2-f4b964f6b5c8",
147+
"path": "<XRController>/{Primary2DAxis}",
137148
"interactions": "",
138149
"processors": "",
139-
"groups": ";Keyboard&Mouse",
150+
"groups": "XR",
140151
"action": "Move",
141152
"isComposite": false,
142-
"isPartOfComposite": true
153+
"isPartOfComposite": false
143154
},
144155
{
145-
"name": "right",
146-
"id": "24b2f255-eebe-4388-834e-f3ccde2c559b",
147-
"path": "<Keyboard>/rightArrow",
156+
"name": "",
157+
"id": "3ea4d645-4504-4529-b061-ab81934c3752",
158+
"path": "<Joystick>/stick",
148159
"interactions": "",
149160
"processors": "",
150-
"groups": ";Keyboard&Mouse",
161+
"groups": "Joystick",
151162
"action": "Move",
152163
"isComposite": false,
153-
"isPartOfComposite": true
164+
"isPartOfComposite": false
154165
},
155166
{
156167
"name": "",
@@ -174,6 +185,17 @@
174185
"isComposite": false,
175186
"isPartOfComposite": false
176187
},
188+
{
189+
"name": "",
190+
"id": "3e5f5442-8668-4b27-a940-df99bad7e831",
191+
"path": "<Joystick>/{Hatswitch}",
192+
"interactions": "",
193+
"processors": "",
194+
"groups": "Joystick",
195+
"action": "Look",
196+
"isComposite": false,
197+
"isPartOfComposite": false
198+
},
177199
{
178200
"name": "",
179201
"id": "143bb1cd-cc10-4eca-a2f0-a3664166fe91",
@@ -217,6 +239,17 @@
217239
"action": "Fire",
218240
"isComposite": false,
219241
"isPartOfComposite": false
242+
},
243+
{
244+
"name": "",
245+
"id": "8255d333-5683-4943-a58a-ccb207ff1dce",
246+
"path": "<XRController>/{PrimaryAction}",
247+
"interactions": "",
248+
"processors": "",
249+
"groups": "XR",
250+
"action": "Fire",
251+
"isComposite": false,
252+
"isPartOfComposite": false
220253
}
221254
]
222255
},
@@ -496,7 +529,7 @@
496529
"path": "<Keyboard>/w",
497530
"interactions": "",
498531
"processors": "",
499-
"groups": "",
532+
"groups": "Keyboard&Mouse",
500533
"action": "Navigate",
501534
"isComposite": false,
502535
"isPartOfComposite": true
@@ -507,7 +540,7 @@
507540
"path": "<Keyboard>/upArrow",
508541
"interactions": "",
509542
"processors": "",
510-
"groups": "",
543+
"groups": "Keyboard&Mouse",
511544
"action": "Navigate",
512545
"isComposite": false,
513546
"isPartOfComposite": true
@@ -518,7 +551,7 @@
518551
"path": "<Keyboard>/s",
519552
"interactions": "",
520553
"processors": "",
521-
"groups": "",
554+
"groups": "Keyboard&Mouse",
522555
"action": "Navigate",
523556
"isComposite": false,
524557
"isPartOfComposite": true
@@ -529,7 +562,7 @@
529562
"path": "<Keyboard>/downArrow",
530563
"interactions": "",
531564
"processors": "",
532-
"groups": "",
565+
"groups": "Keyboard&Mouse",
533566
"action": "Navigate",
534567
"isComposite": false,
535568
"isPartOfComposite": true
@@ -540,7 +573,7 @@
540573
"path": "<Keyboard>/a",
541574
"interactions": "",
542575
"processors": "",
543-
"groups": "",
576+
"groups": "Keyboard&Mouse",
544577
"action": "Navigate",
545578
"isComposite": false,
546579
"isPartOfComposite": true
@@ -551,7 +584,7 @@
551584
"path": "<Keyboard>/leftArrow",
552585
"interactions": "",
553586
"processors": "",
554-
"groups": "",
587+
"groups": "Keyboard&Mouse",
555588
"action": "Navigate",
556589
"isComposite": false,
557590
"isPartOfComposite": true
@@ -562,7 +595,7 @@
562595
"path": "<Keyboard>/d",
563596
"interactions": "",
564597
"processors": "",
565-
"groups": "",
598+
"groups": "Keyboard&Mouse",
566599
"action": "Navigate",
567600
"isComposite": false,
568601
"isPartOfComposite": true
@@ -573,7 +606,7 @@
573606
"path": "<Keyboard>/rightArrow",
574607
"interactions": "",
575608
"processors": "",
576-
"groups": "",
609+
"groups": "Keyboard&Mouse",
577610
"action": "Navigate",
578611
"isComposite": false,
579612
"isPartOfComposite": true
@@ -606,7 +639,7 @@
606639
"path": "<Pointer>/position",
607640
"interactions": "",
608641
"processors": "",
609-
"groups": "",
642+
"groups": "Keyboard&Mouse",
610643
"action": "Point",
611644
"isComposite": false,
612645
"isPartOfComposite": false
@@ -617,7 +650,7 @@
617650
"path": "<Touchscreen>/touch*/position",
618651
"interactions": "",
619652
"processors": "",
620-
"groups": "",
653+
"groups": "Touch",
621654
"action": "Point",
622655
"isComposite": false,
623656
"isPartOfComposite": false
@@ -650,7 +683,7 @@
650683
"path": "<Touchscreen>/touch*/press",
651684
"interactions": "",
652685
"processors": "",
653-
"groups": "",
686+
"groups": "Touch",
654687
"action": "Click",
655688
"isComposite": false,
656689
"isPartOfComposite": false
@@ -694,7 +727,7 @@
694727
"path": "<XRController>/devicePosition",
695728
"interactions": "",
696729
"processors": "",
697-
"groups": "",
730+
"groups": "XR",
698731
"action": "TrackedDevicePosition",
699732
"isComposite": false,
700733
"isPartOfComposite": false
@@ -705,7 +738,7 @@
705738
"path": "<XRController>/deviceRotation",
706739
"interactions": "",
707740
"processors": "",
708-
"groups": "",
741+
"groups": "XR",
709742
"action": "TrackedDeviceOrientation",
710743
"isComposite": false,
711744
"isPartOfComposite": false
@@ -716,7 +749,7 @@
716749
"path": "<XRController>/trigger",
717750
"interactions": "",
718751
"processors": "",
719-
"groups": "",
752+
"groups": "XR",
720753
"action": "TrackedDeviceSelect",
721754
"isComposite": false,
722755
"isPartOfComposite": false
@@ -773,6 +806,17 @@
773806
"isOR": false
774807
}
775808
]
809+
},
810+
{
811+
"name": "XR",
812+
"bindingGroup": "XR",
813+
"devices": [
814+
{
815+
"devicePath": "<XRController>",
816+
"isOptional": false,
817+
"isOR": false
818+
}
819+
]
776820
}
777821
]
778822
}

Packages/com.unity.inputsystem/InputSystem/Plugins/XInput/XInputController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public class XInputController : Gamepad
6565
[InputControl(name = "leftTrigger", shortDisplayName = "LT")]
6666
[InputControl(name = "rightTrigger", shortDisplayName = "RT")]
6767
// This follows Xbox One conventions; on Xbox 360, this is start=start and select=back.
68-
[InputControl(name = "start", displayName = "Menu")]
69-
[InputControl(name = "select", displayName = "View")]
68+
[InputControl(name = "start", displayName = "Menu", alias = "menu")]
69+
[InputControl(name = "select", displayName = "View", alias = "view")]
7070
public ButtonControl menu { get; private set; }
7171

7272
/// <summary>

0 commit comments

Comments
 (0)