@@ -91,21 +91,21 @@ private void PressBindingsForInputActions(Keyboard keyboard, InputAction action1
9191 for ( int i = 0 ; i < action1 . controls . Count ; i ++ )
9292 {
9393 Debug . Log ( "action 1 binding pressed: " + action1 . controls [ i ] . path ) ;
94- Press ( ( ButtonControl ) keyboard [ action1 . controls [ i ] . name ] , queueEventOnly : true ) ;
94+ Press ( ( ButtonControl ) action1 . controls [ i ] , queueEventOnly : true ) ;
9595 }
9696
9797 for ( int i = 0 ; i < action2 . controls . Count ; i ++ )
9898 {
9999 Debug . Log ( "action 2 binding pressed: " + action2 . controls [ i ] . name ) ;
100- Press ( ( ButtonControl ) keyboard [ action2 . controls [ i ] . name ] , queueEventOnly : true ) ;
100+ Press ( ( ButtonControl ) action2 . controls [ i ] , queueEventOnly : true ) ;
101101 }
102102
103103 if ( action3 != null )
104104 {
105- for ( int i = 0 ; i < action2 . controls . Count ; i ++ )
105+ for ( int i = 0 ; i < action3 . controls . Count ; i ++ )
106106 {
107- Debug . Log ( "action 2 binding pressed: " + action2 . controls [ i ] . name ) ;
108- Press ( ( ButtonControl ) keyboard [ action2 . controls [ i ] . name ] , queueEventOnly : true ) ;
107+ Debug . Log ( "action 3 binding pressed: " + action3 . controls [ i ] . name ) ;
108+ Press ( ( ButtonControl ) action3 . controls [ i ] , queueEventOnly : true ) ;
109109 }
110110 }
111111
@@ -117,12 +117,12 @@ private void ReleaseBindingsForActions(Keyboard keyboard, InputAction action1, I
117117 // Cleanup key presses
118118 for ( int i = 0 ; i < action1 . controls . Count ; i ++ )
119119 {
120- Release ( ( ButtonControl ) keyboard [ action1 . controls [ i ] . name ] , queueEventOnly : true ) ;
120+ Release ( ( ButtonControl ) action1 . controls [ i ] , queueEventOnly : true ) ;
121121 }
122122
123123 for ( int i = 0 ; i < action2 . controls . Count ; i ++ )
124124 {
125- Release ( ( ButtonControl ) keyboard [ action2 . controls [ i ] . name ] , queueEventOnly : true ) ;
125+ Release ( ( ButtonControl ) action2 . controls [ i ] , queueEventOnly : true ) ;
126126 }
127127
128128 InputSystem . Update ( ) ;
@@ -403,6 +403,7 @@ private static IEnumerable<ThreeInputActionDataWrapper<InputAction, InputAction,
403403 public void AltShiftW_Only_Triggers_TeamChat ( ThreeInputActionDataWrapper < InputAction , InputAction , InputAction > threeInputActions )
404404 {
405405 var keyboard = InputSystem . AddDevice < Keyboard > ( ) ;
406+ threeInputActions . Action1 . m_ActionMap . Enable ( ) ;
406407 PressBindingsForInputActions ( keyboard , threeInputActions . Action1 , threeInputActions . Action2 ) ;
407408
408409
0 commit comments