SwitchSettings.cs 21 KB

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