SwitchSettings.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421
  1. using Gtk;
  2. using GUI = Gtk.Builder.ObjectAttribute;
  3. using Ryujinx.HLE.HOS.SystemState;
  4. using Ryujinx.HLE.Input;
  5. using Ryujinx.UI.Input;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.IO;
  9. using System.Linq;
  10. using System.Reflection;
  11. namespace Ryujinx.UI
  12. {
  13. public class SwitchSettings : Window
  14. {
  15. internal static Configuration SwitchConfig { get; set; }
  16. internal HLE.Switch Device { get; set; }
  17. private static ListStore _gameDirsBoxStore;
  18. private static bool _listeningForKeypress;
  19. #pragma warning disable 649
  20. [GUI] Window _settingsWin;
  21. [GUI] CheckButton _errorLogToggle;
  22. [GUI] CheckButton _warningLogToggle;
  23. [GUI] CheckButton _infoLogToggle;
  24. [GUI] CheckButton _stubLogToggle;
  25. [GUI] CheckButton _debugLogToggle;
  26. [GUI] CheckButton _fileLogToggle;
  27. [GUI] CheckButton _guestLogToggle;
  28. [GUI] CheckButton _fsAccessLogToggle;
  29. [GUI] Adjustment _fsLogSpinAdjustment;
  30. [GUI] CheckButton _dockedModeToggle;
  31. [GUI] CheckButton _discordToggle;
  32. [GUI] CheckButton _vSyncToggle;
  33. [GUI] CheckButton _multiSchedToggle;
  34. [GUI] CheckButton _fsicToggle;
  35. [GUI] CheckButton _ignoreToggle;
  36. [GUI] CheckButton _directKeyboardAccess;
  37. [GUI] ComboBoxText _systemLanguageSelect;
  38. [GUI] CheckButton _custThemeToggle;
  39. [GUI] Entry _custThemePath;
  40. [GUI] ToggleButton _browseThemePath;
  41. [GUI] Label _custThemePathLabel;
  42. [GUI] TreeView _gameDirsBox;
  43. [GUI] Entry _addGameDirBox;
  44. [GUI] ToggleButton _addDir;
  45. [GUI] ToggleButton _browseDir;
  46. [GUI] ToggleButton _removeDir;
  47. [GUI] Entry _logPath;
  48. [GUI] Entry _graphicsShadersDumpPath;
  49. [GUI] Image _controllerImage;
  50. [GUI] ComboBoxText _controller1Type;
  51. [GUI] ToggleButton _lStickUp1;
  52. [GUI] ToggleButton _lStickDown1;
  53. [GUI] ToggleButton _lStickLeft1;
  54. [GUI] ToggleButton _lStickRight1;
  55. [GUI] ToggleButton _lStickButton1;
  56. [GUI] ToggleButton _dpadUp1;
  57. [GUI] ToggleButton _dpadDown1;
  58. [GUI] ToggleButton _dpadLeft1;
  59. [GUI] ToggleButton _dpadRight1;
  60. [GUI] ToggleButton _minus1;
  61. [GUI] ToggleButton _l1;
  62. [GUI] ToggleButton _zL1;
  63. [GUI] ToggleButton _rStickUp1;
  64. [GUI] ToggleButton _rStickDown1;
  65. [GUI] ToggleButton _rStickLeft1;
  66. [GUI] ToggleButton _rStickRight1;
  67. [GUI] ToggleButton _rStickButton1;
  68. [GUI] ToggleButton _a1;
  69. [GUI] ToggleButton _b1;
  70. [GUI] ToggleButton _x1;
  71. [GUI] ToggleButton _y1;
  72. [GUI] ToggleButton _plus1;
  73. [GUI] ToggleButton _r1;
  74. [GUI] ToggleButton _zR1;
  75. #pragma warning restore 649
  76. public static void ConfigureSettings(Configuration Instance) { SwitchConfig = Instance; }
  77. public SwitchSettings(HLE.Switch device) : this(new Builder("Ryujinx.Ui.SwitchSettings.glade"), device) { }
  78. private SwitchSettings(Builder builder, HLE.Switch device) : base(builder.GetObject("_settingsWin").Handle)
  79. {
  80. Device = device;
  81. builder.Autoconnect(this);
  82. _settingsWin.Icon = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.ryujinxIcon.png");
  83. _controllerImage.Pixbuf = new Gdk.Pixbuf(Assembly.GetExecutingAssembly(), "Ryujinx.Ui.assets.JoyCon.png", 500, 500);
  84. //Bind Events
  85. _lStickUp1.Clicked += (o, args) => Button_Pressed(o, args, _lStickUp1);
  86. _lStickDown1.Clicked += (o, args) => Button_Pressed(o, args, _lStickDown1);
  87. _lStickLeft1.Clicked += (o, args) => Button_Pressed(o, args, _lStickLeft1);
  88. _lStickRight1.Clicked += (o, args) => Button_Pressed(o, args, _lStickRight1);
  89. _lStickButton1.Clicked += (o, args) => Button_Pressed(o, args, _lStickButton1);
  90. _dpadUp1.Clicked += (o, args) => Button_Pressed(o, args, _dpadUp1);
  91. _dpadDown1.Clicked += (o, args) => Button_Pressed(o, args, _dpadDown1);
  92. _dpadLeft1.Clicked += (o, args) => Button_Pressed(o, args, _dpadLeft1);
  93. _dpadRight1.Clicked += (o, args) => Button_Pressed(o, args, _dpadRight1);
  94. _minus1.Clicked += (o, args) => Button_Pressed(o, args, _minus1);
  95. _l1.Clicked += (o, args) => Button_Pressed(o, args, _l1);
  96. _zL1.Clicked += (o, args) => Button_Pressed(o, args, _zL1);
  97. _rStickUp1.Clicked += (o, args) => Button_Pressed(o, args, _rStickUp1);
  98. _rStickDown1.Clicked += (o, args) => Button_Pressed(o, args, _rStickDown1);
  99. _rStickLeft1.Clicked += (o, args) => Button_Pressed(o, args, _rStickLeft1);
  100. _rStickRight1.Clicked += (o, args) => Button_Pressed(o, args, _rStickRight1);
  101. _rStickButton1.Clicked += (o, args) => Button_Pressed(o, args, _rStickButton1);
  102. _a1.Clicked += (o, args) => Button_Pressed(o, args, _a1);
  103. _b1.Clicked += (o, args) => Button_Pressed(o, args, _b1);
  104. _x1.Clicked += (o, args) => Button_Pressed(o, args, _x1);
  105. _y1.Clicked += (o, args) => Button_Pressed(o, args, _y1);
  106. _plus1.Clicked += (o, args) => Button_Pressed(o, args, _plus1);
  107. _r1.Clicked += (o, args) => Button_Pressed(o, args, _r1);
  108. _zR1.Clicked += (o, args) => Button_Pressed(o, args, _zR1);
  109. //Setup Currents
  110. if (SwitchConfig.EnableFileLog) { _fileLogToggle.Click(); }
  111. if (SwitchConfig.LoggingEnableError) { _errorLogToggle.Click(); }
  112. if (SwitchConfig.LoggingEnableWarn) { _warningLogToggle.Click(); }
  113. if (SwitchConfig.LoggingEnableInfo) { _infoLogToggle.Click(); }
  114. if (SwitchConfig.LoggingEnableStub) { _stubLogToggle.Click(); }
  115. if (SwitchConfig.LoggingEnableDebug) { _debugLogToggle.Click(); }
  116. if (SwitchConfig.LoggingEnableGuest) { _guestLogToggle.Click(); }
  117. if (SwitchConfig.LoggingEnableFsAccessLog) { _fsAccessLogToggle.Click(); }
  118. if (SwitchConfig.DockedMode) { _dockedModeToggle.Click(); }
  119. if (SwitchConfig.EnableDiscordIntegration) { _discordToggle.Click(); }
  120. if (SwitchConfig.EnableVsync) { _vSyncToggle.Click(); }
  121. if (SwitchConfig.EnableMulticoreScheduling) { _multiSchedToggle.Click(); }
  122. if (SwitchConfig.EnableFsIntegrityChecks) { _fsicToggle.Click(); }
  123. if (SwitchConfig.IgnoreMissingServices) { _ignoreToggle.Click(); }
  124. if (SwitchConfig.EnableKeyboard) { _directKeyboardAccess.Click(); }
  125. if (SwitchConfig.EnableCustomTheme) { _custThemeToggle.Click(); }
  126. _systemLanguageSelect.SetActiveId(SwitchConfig.SystemLanguage.ToString());
  127. _controller1Type .SetActiveId(SwitchConfig.ControllerType.ToString());
  128. _lStickUp1.Label = SwitchConfig.KeyboardControls.LeftJoycon.StickUp.ToString();
  129. _lStickDown1.Label = SwitchConfig.KeyboardControls.LeftJoycon.StickDown.ToString();
  130. _lStickLeft1.Label = SwitchConfig.KeyboardControls.LeftJoycon.StickLeft.ToString();
  131. _lStickRight1.Label = SwitchConfig.KeyboardControls.LeftJoycon.StickRight.ToString();
  132. _lStickButton1.Label = SwitchConfig.KeyboardControls.LeftJoycon.StickButton.ToString();
  133. _dpadUp1.Label = SwitchConfig.KeyboardControls.LeftJoycon.DPadUp.ToString();
  134. _dpadDown1.Label = SwitchConfig.KeyboardControls.LeftJoycon.DPadDown.ToString();
  135. _dpadLeft1.Label = SwitchConfig.KeyboardControls.LeftJoycon.DPadLeft.ToString();
  136. _dpadRight1.Label = SwitchConfig.KeyboardControls.LeftJoycon.DPadRight.ToString();
  137. _minus1.Label = SwitchConfig.KeyboardControls.LeftJoycon.ButtonMinus.ToString();
  138. _l1.Label = SwitchConfig.KeyboardControls.LeftJoycon.ButtonL.ToString();
  139. _zL1.Label = SwitchConfig.KeyboardControls.LeftJoycon.ButtonZl.ToString();
  140. _rStickUp1.Label = SwitchConfig.KeyboardControls.RightJoycon.StickUp.ToString();
  141. _rStickDown1.Label = SwitchConfig.KeyboardControls.RightJoycon.StickDown.ToString();
  142. _rStickLeft1.Label = SwitchConfig.KeyboardControls.RightJoycon.StickLeft.ToString();
  143. _rStickRight1.Label = SwitchConfig.KeyboardControls.RightJoycon.StickRight.ToString();
  144. _rStickButton1.Label = SwitchConfig.KeyboardControls.RightJoycon.StickButton.ToString();
  145. _a1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonA.ToString();
  146. _b1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonB.ToString();
  147. _x1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonX.ToString();
  148. _y1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonY.ToString();
  149. _plus1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonPlus.ToString();
  150. _r1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonR.ToString();
  151. _zR1.Label = SwitchConfig.KeyboardControls.RightJoycon.ButtonZr.ToString();
  152. _custThemePath.Buffer.Text = SwitchConfig.CustomThemePath;
  153. _graphicsShadersDumpPath.Buffer.Text = SwitchConfig.GraphicsShadersDumpPath;
  154. _fsLogSpinAdjustment.Value = SwitchConfig.FsGlobalAccessLogMode;
  155. _gameDirsBox.AppendColumn("", new CellRendererText(), "text", 0);
  156. _gameDirsBoxStore = new ListStore(typeof(string));
  157. _gameDirsBox.Model = _gameDirsBoxStore;
  158. foreach (string gameDir in SwitchConfig.GameDirs)
  159. {
  160. _gameDirsBoxStore.AppendValues(gameDir);
  161. }
  162. if (_custThemeToggle.Active == false)
  163. {
  164. _custThemePath.Sensitive = false;
  165. _custThemePathLabel.Sensitive = false;
  166. _browseThemePath.Sensitive = false;
  167. }
  168. _logPath.Buffer.Text = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ryujinx.log");
  169. _listeningForKeypress = false;
  170. }
  171. //Events
  172. private void Button_Pressed(object obj, EventArgs args, ToggleButton Button)
  173. {
  174. if (_listeningForKeypress == false)
  175. {
  176. KeyPressEvent += On_KeyPress;
  177. _listeningForKeypress = true;
  178. void On_KeyPress(object Obj, KeyPressEventArgs KeyPressed)
  179. {
  180. string key = KeyPressed.Event.Key.ToString();
  181. string capKey = key.First().ToString().ToUpper() + key.Substring(1);
  182. if (Enum.IsDefined(typeof(OpenTK.Input.Key), capKey))
  183. {
  184. Button.Label = capKey;
  185. }
  186. else if (GdkToOpenTKInput.ContainsKey(key))
  187. {
  188. Button.Label = GdkToOpenTKInput[key];
  189. }
  190. else
  191. {
  192. Button.Label = "Space";
  193. }
  194. Button.SetStateFlags(0, true);
  195. KeyPressEvent -= On_KeyPress;
  196. _listeningForKeypress = false;
  197. }
  198. }
  199. else
  200. {
  201. Button.SetStateFlags(0, true);
  202. }
  203. }
  204. private void AddDir_Pressed(object obj, EventArgs args)
  205. {
  206. if (Directory.Exists(_addGameDirBox.Buffer.Text))
  207. {
  208. _gameDirsBoxStore.AppendValues(_addGameDirBox.Buffer.Text);
  209. }
  210. _addDir.SetStateFlags(0, true);
  211. }
  212. private void BrowseDir_Pressed(object obj, EventArgs args)
  213. {
  214. FileChooserDialog fileChooser = new FileChooserDialog("Choose the game directory to add to the list", this, FileChooserAction.SelectFolder, "Cancel", ResponseType.Cancel, "Add", ResponseType.Accept);
  215. if (fileChooser.Run() == (int)ResponseType.Accept)
  216. {
  217. _gameDirsBoxStore.AppendValues(fileChooser.Filename);
  218. }
  219. fileChooser.Destroy();
  220. _browseDir.SetStateFlags(0, true);
  221. }
  222. private void RemoveDir_Pressed(object obj, EventArgs args)
  223. {
  224. TreeSelection selection = _gameDirsBox.Selection;
  225. selection.GetSelected(out TreeIter treeIter);
  226. _gameDirsBoxStore.Remove(ref treeIter);
  227. _removeDir.SetStateFlags(0, true);
  228. }
  229. private void CustThemeToggle_Activated(object obj, EventArgs args)
  230. {
  231. _custThemePath.Sensitive = _custThemeToggle.Active;
  232. _custThemePathLabel.Sensitive = _custThemeToggle.Active;
  233. _browseThemePath.Sensitive = _custThemeToggle.Active;
  234. }
  235. private void BrowseThemeDir_Pressed(object obj, EventArgs args)
  236. {
  237. FileChooserDialog fileChooser = new FileChooserDialog("Choose the theme to load", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Select", ResponseType.Accept);
  238. fileChooser.Filter = new FileFilter();
  239. fileChooser.Filter.AddPattern("*.css");
  240. if (fileChooser.Run() == (int)ResponseType.Accept)
  241. {
  242. _custThemePath.Buffer.Text = fileChooser.Filename;
  243. }
  244. fileChooser.Destroy();
  245. _browseThemePath.SetStateFlags(0, true);
  246. }
  247. private void SaveToggle_Activated(object obj, EventArgs args)
  248. {
  249. List<string> gameDirs = new List<string>();
  250. _gameDirsBoxStore.GetIterFirst(out TreeIter treeIter);
  251. for (int i = 0; i < _gameDirsBoxStore.IterNChildren(); i++)
  252. {
  253. _gameDirsBoxStore.GetValue(treeIter, i);
  254. gameDirs.Add((string)_gameDirsBoxStore.GetValue(treeIter, 0));
  255. _gameDirsBoxStore.IterNext(ref treeIter);
  256. }
  257. SwitchConfig.LoggingEnableError = _errorLogToggle.Active;
  258. SwitchConfig.LoggingEnableWarn = _warningLogToggle.Active;
  259. SwitchConfig.LoggingEnableInfo = _infoLogToggle.Active;
  260. SwitchConfig.LoggingEnableStub = _stubLogToggle.Active;
  261. SwitchConfig.LoggingEnableDebug = _debugLogToggle.Active;
  262. SwitchConfig.LoggingEnableGuest = _guestLogToggle.Active;
  263. SwitchConfig.LoggingEnableFsAccessLog = _fsAccessLogToggle.Active;
  264. SwitchConfig.EnableFileLog = _fileLogToggle.Active;
  265. SwitchConfig.DockedMode = _dockedModeToggle.Active;
  266. SwitchConfig.EnableDiscordIntegration = _discordToggle.Active;
  267. SwitchConfig.EnableVsync = _vSyncToggle.Active;
  268. SwitchConfig.EnableMulticoreScheduling = _multiSchedToggle.Active;
  269. SwitchConfig.EnableFsIntegrityChecks = _fsicToggle.Active;
  270. SwitchConfig.IgnoreMissingServices = _ignoreToggle.Active;
  271. SwitchConfig.EnableKeyboard = _directKeyboardAccess.Active;
  272. SwitchConfig.EnableCustomTheme = _custThemeToggle.Active;
  273. SwitchConfig.KeyboardControls.LeftJoycon = new NpadKeyboardLeft()
  274. {
  275. StickUp = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _lStickUp1.Label),
  276. StickDown = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _lStickDown1.Label),
  277. StickLeft = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _lStickLeft1.Label),
  278. StickRight = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _lStickRight1.Label),
  279. StickButton = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _lStickButton1.Label),
  280. DPadUp = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _dpadUp1.Label),
  281. DPadDown = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _dpadDown1.Label),
  282. DPadLeft = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _dpadLeft1.Label),
  283. DPadRight = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _dpadRight1.Label),
  284. ButtonMinus = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _minus1.Label),
  285. ButtonL = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _l1.Label),
  286. ButtonZl = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _zL1.Label),
  287. };
  288. SwitchConfig.KeyboardControls.RightJoycon = new NpadKeyboardRight()
  289. {
  290. StickUp = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _rStickUp1.Label),
  291. StickDown = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _rStickDown1.Label),
  292. StickLeft = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _rStickLeft1.Label),
  293. StickRight = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _rStickRight1.Label),
  294. StickButton = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _rStickButton1.Label),
  295. ButtonA = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _a1.Label),
  296. ButtonB = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _b1.Label),
  297. ButtonX = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _x1.Label),
  298. ButtonY = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _y1.Label),
  299. ButtonPlus = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _plus1.Label),
  300. ButtonR = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _r1.Label),
  301. ButtonZr = (OpenTK.Input.Key)Enum.Parse(typeof(OpenTK.Input.Key), _zR1.Label),
  302. };
  303. SwitchConfig.SystemLanguage = (SystemLanguage)Enum.Parse(typeof(SystemLanguage), _systemLanguageSelect.ActiveId);
  304. SwitchConfig.ControllerType = (ControllerStatus)Enum.Parse(typeof(ControllerStatus), _controller1Type.ActiveId);
  305. SwitchConfig.CustomThemePath = _custThemePath.Buffer.Text;
  306. SwitchConfig.GraphicsShadersDumpPath = _graphicsShadersDumpPath.Buffer.Text;
  307. SwitchConfig.GameDirs = gameDirs;
  308. SwitchConfig.FsGlobalAccessLogMode = (int)_fsLogSpinAdjustment.Value;
  309. Configuration.SaveConfig(SwitchConfig, System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config.json"));
  310. Configuration.Configure(Device, SwitchConfig);
  311. MainWindow.ApplyTheme();
  312. MainWindow.UpdateGameTable();
  313. Destroy();
  314. }
  315. private void CloseToggle_Activated(object obj, EventArgs args)
  316. {
  317. Destroy();
  318. }
  319. public readonly Dictionary<string, string> GdkToOpenTKInput = new Dictionary<string, string>()
  320. {
  321. { "Key_0", "Number0" },
  322. { "Key_1", "Number1" },
  323. { "Key_2", "Number2" },
  324. { "Key_3", "Number3" },
  325. { "Key_4", "Number4" },
  326. { "Key_5", "Number5" },
  327. { "Key_6", "Number6" },
  328. { "Key_7", "Number7" },
  329. { "Key_8", "Number8" },
  330. { "Key_9", "Number9" },
  331. { "equal", "Plus" },
  332. { "uparrow", "Up" },
  333. { "downarrow", "Down" },
  334. { "leftarrow", "Left" },
  335. { "rightarrow", "Right" },
  336. { "Control_L", "ControlLeft" },
  337. { "Control_R", "ControlRight" },
  338. { "Shift_L", "ShiftLeft" },
  339. { "Shift_R", "ShiftRight" },
  340. { "Alt_L", "AltLeft" },
  341. { "Alt_R", "AltRight" },
  342. { "Page_Up", "PageUp" },
  343. { "Page_Down", "PageDown" },
  344. { "KP_Enter", "KeypadEnter" },
  345. { "KP_Up", "Up" },
  346. { "KP_Down", "Down" },
  347. { "KP_Left", "Left" },
  348. { "KP_Right", "Right" },
  349. { "KP_Divide", "KeypadDivide" },
  350. { "KP_Multiply", "KeypadMultiply" },
  351. { "KP_Subtract", "KeypadSubtract" },
  352. { "KP_Add", "KeypadAdd" },
  353. { "KP_Decimal", "KeypadDecimal" },
  354. { "KP_0", "Keypad0" },
  355. { "KP_1", "Keypad1" },
  356. { "KP_2", "Keypad2" },
  357. { "KP_3", "Keypad3" },
  358. { "KP_4", "Keypad4" },
  359. { "KP_5", "Keypad5" },
  360. { "KP_6", "Keypad6" },
  361. { "KP_7", "Keypad7" },
  362. { "KP_8", "Keypad8" },
  363. { "KP_9", "Keypad9" },
  364. };
  365. }
  366. }