@@ -17,6 +17,7 @@ public static class KeymapPresetOperations
1717 const int Height = 70 ;
1818 const float FontSizePresetButton = 8.5f ;
1919 const string PRESET_BROWSING = "Browsing" ;
20+ const string PRESET_GAMING = "Gaming" ;
2021 const string MSG_PRESET_SELECTED = "\n *SELECTED*" ;
2122 public static void ChangeButtonTextForSelected ( Button prButton , bool makeSelected )
2223 {
@@ -65,8 +66,7 @@ static Button BuildPresetButton(string presetName)
6566 }
6667 List < KeymapPreset > presetButtons = new ( ) ;
6768 presetButtons . Add ( new ( ) { ButtonForPresetSection = BuildPresetButton ( PRESET_BROWSING ) , KeymapName = PRESET_BROWSING , Keymaps = BuildPresetBrowsing ( ) } ) ;
68- presetButtons . Add ( new ( ) { ButtonForPresetSection = BuildPresetButton ( PRESET_BROWSING ) , KeymapName = PRESET_BROWSING , Keymaps = BuildPresetBrowsing ( ) } ) ;
69- presetButtons . Add ( new ( ) { ButtonForPresetSection = BuildPresetButton ( PRESET_BROWSING ) , KeymapName = PRESET_BROWSING , Keymaps = BuildPresetBrowsing ( ) } ) ;
69+ presetButtons . Add ( new ( ) { ButtonForPresetSection = BuildPresetButton ( PRESET_GAMING ) , KeymapName = PRESET_BROWSING , Keymaps = BuildPresetGaming ( ) } ) ;
7070 return presetButtons ;
7171 }
7272 public static List < XMapLibKeymap > BuildPresetBrowsing ( )
@@ -97,5 +97,39 @@ public static List<XMapLibKeymap> BuildPresetBrowsing()
9797 } ;
9898 return mp ;
9999 }
100+ public static List < XMapLibKeymap > BuildPresetGaming ( )
101+ {
102+ List < XMapLibKeymap > mp = new ( )
103+ {
104+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_DPAD_DOWN , VKMappedTo = ( int ) Keys . Down } ,
105+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_DPAD_UP , VKMappedTo = ( int ) Keys . Up } ,
106+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_DPAD_LEFT , VKMappedTo = ( int ) Keys . Left } ,
107+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_DPAD_RIGHT , VKMappedTo = ( int ) Keys . Right } ,
108+ new ( ) { UsesRepeatBehavior = false , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTRIGGER , VKMappedTo = ( int ) Keys . RButton } ,
109+ new ( ) { UsesRepeatBehavior = false , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_RTRIGGER , VKMappedTo = ( int ) Keys . LButton } ,
110+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_UP , VKMappedTo = ( int ) Keys . W } ,
111+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_LEFT , VKMappedTo = ( int ) Keys . A } ,
112+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_DOWN , VKMappedTo = ( int ) Keys . S } ,
113+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_RIGHT , VKMappedTo = ( int ) Keys . D } ,
114+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_UPLEFT , VKMappedTo = ( int ) Keys . W } ,
115+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_UPLEFT , VKMappedTo = ( int ) Keys . A } ,
116+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_UPRIGHT , VKMappedTo = ( int ) Keys . W } ,
117+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_UPRIGHT , VKMappedTo = ( int ) Keys . D } ,
118+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_DOWNLEFT , VKMappedTo = ( int ) Keys . S } ,
119+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_DOWNLEFT , VKMappedTo = ( int ) Keys . A } ,
120+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_DOWNRIGHT , VKMappedTo = ( int ) Keys . S } ,
121+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_DOWNRIGHT , VKMappedTo = ( int ) Keys . D } ,
122+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_A , VKMappedTo = ( int ) Keys . Space } ,
123+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_B , VKMappedTo = ( int ) Keys . F } ,
124+ new ( ) { UsesRepeatBehavior = false , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_Y , VKMappedTo = ( int ) Keys . G } ,
125+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_RTHUMB_PRESS , VKMappedTo = ( int ) Keys . C } ,
126+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LTHUMB_PRESS , VKMappedTo = ( int ) Keys . LShiftKey } ,
127+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_START , VKMappedTo = ( int ) Keys . Escape } ,
128+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_LSHOULDER , VKMappedTo = ( int ) Keys . Q } ,
129+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_RSHOULDER , VKMappedTo = ( int ) Keys . E } ,
130+ new ( ) { UsesRepeatBehavior = true , VKMappedFrom = ( int ) ControllerButtons . VK_PAD_X , VKMappedTo = ( int ) Keys . R }
131+ } ;
132+ return mp ;
133+ }
100134 }
101135}
0 commit comments