From 94c20050f69a31e7f5df3ca420afcdf6cef0a900 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:30:15 +0100 Subject: [PATCH] FN-V binding --- app/Extra.Designer.cs | 445 +++++++++++++++++++---------------- app/Extra.cs | 10 + app/Input/InputDispatcher.cs | 6 + app/Settings.cs | 10 + 4 files changed, 270 insertions(+), 201 deletions(-) diff --git a/app/Extra.Designer.cs b/app/Extra.Designer.cs index fee5be60..797ca90f 100644 --- a/app/Extra.Designer.cs +++ b/app/Extra.Designer.cs @@ -45,24 +45,27 @@ namespace GHelper labelFNE = new Label(); comboFNE = new RComboBox(); textFNE = new TextBox(); + labelFNV = new Label(); + comboFNV = new RComboBox(); + textFNV = new TextBox(); labelFNC = new Label(); - textM2 = new TextBox(); - textM1 = new TextBox(); - comboM1 = new RComboBox(); - labelM1 = new Label(); - comboM4 = new RComboBox(); - comboM3 = new RComboBox(); - textM4 = new TextBox(); - textM3 = new TextBox(); - labelM4 = new Label(); - labelM3 = new Label(); - labelM2 = new Label(); - comboM2 = new RComboBox(); + comboFNC = new RComboBox(); + textFNC = new TextBox(); labelFNF4 = new Label(); comboFNF4 = new RComboBox(); textFNF4 = new TextBox(); - comboFNC = new RComboBox(); - textFNC = new TextBox(); + comboM4 = new RComboBox(); + textM4 = new TextBox(); + labelM4 = new Label(); + comboM3 = new RComboBox(); + textM3 = new TextBox(); + labelM3 = new Label(); + textM2 = new TextBox(); + labelM2 = new Label(); + comboM2 = new RComboBox(); + textM1 = new TextBox(); + comboM1 = new RComboBox(); + labelM1 = new Label(); tableKeys = new TableLayoutPanel(); panelBacklightHeader = new Panel(); sliderBrightness = new Slider(); @@ -171,7 +174,7 @@ namespace GHelper panelServices.Controls.Add(labelServices); panelServices.Controls.Add(buttonServices); panelServices.Dock = DockStyle.Top; - panelServices.Location = new Point(15, 1508); + panelServices.Location = new Point(15, 1554); panelServices.Name = "panelServices"; panelServices.Size = new Size(983, 75); panelServices.TabIndex = 5; @@ -269,7 +272,7 @@ namespace GHelper panelBindings.Location = new Point(15, 66); panelBindings.Name = "panelBindings"; panelBindings.Padding = new Padding(0, 0, 11, 5); - panelBindings.Size = new Size(983, 351); + panelBindings.Size = new Size(983, 397); panelBindings.TabIndex = 1; panelBindings.TabStop = true; // @@ -282,33 +285,36 @@ namespace GHelper tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); - tableBindings.Controls.Add(labelFNE, 0, 6); - tableBindings.Controls.Add(comboFNE, 0, 6); - tableBindings.Controls.Add(textFNE, 0, 6); + tableBindings.Controls.Add(labelFNE, 0, 7); + tableBindings.Controls.Add(comboFNE, 0, 7); + tableBindings.Controls.Add(textFNE, 0, 7); + tableBindings.Controls.Add(labelFNV, 0, 6); + tableBindings.Controls.Add(comboFNV, 1, 6); + tableBindings.Controls.Add(textFNV, 2, 6); tableBindings.Controls.Add(labelFNC, 0, 5); - tableBindings.Controls.Add(textM2, 2, 1); - tableBindings.Controls.Add(textM1, 2, 0); - tableBindings.Controls.Add(comboM1, 1, 0); - tableBindings.Controls.Add(labelM1, 0, 0); - tableBindings.Controls.Add(comboM4, 1, 3); - tableBindings.Controls.Add(comboM3, 1, 2); - tableBindings.Controls.Add(textM4, 2, 3); - tableBindings.Controls.Add(textM3, 2, 2); - tableBindings.Controls.Add(labelM4, 0, 3); - tableBindings.Controls.Add(labelM3, 0, 2); - tableBindings.Controls.Add(labelM2, 0, 1); - tableBindings.Controls.Add(comboM2, 1, 1); + tableBindings.Controls.Add(comboFNC, 1, 5); + tableBindings.Controls.Add(textFNC, 2, 5); tableBindings.Controls.Add(labelFNF4, 0, 4); tableBindings.Controls.Add(comboFNF4, 1, 4); tableBindings.Controls.Add(textFNF4, 2, 4); - tableBindings.Controls.Add(comboFNC, 1, 5); - tableBindings.Controls.Add(textFNC, 2, 5); + tableBindings.Controls.Add(comboM4, 1, 3); + tableBindings.Controls.Add(textM4, 2, 3); + tableBindings.Controls.Add(labelM4, 0, 3); + tableBindings.Controls.Add(comboM3, 1, 2); + tableBindings.Controls.Add(textM3, 2, 2); + tableBindings.Controls.Add(labelM3, 0, 2); + tableBindings.Controls.Add(textM2, 2, 1); + tableBindings.Controls.Add(labelM2, 0, 1); + tableBindings.Controls.Add(comboM2, 1, 1); + tableBindings.Controls.Add(textM1, 2, 0); + tableBindings.Controls.Add(comboM1, 1, 0); + tableBindings.Controls.Add(labelM1, 0, 0); tableBindings.Dock = DockStyle.Top; tableBindings.Location = new Point(0, 0); tableBindings.Margin = new Padding(0, 3, 4, 3); tableBindings.Name = "tableBindings"; tableBindings.Padding = new Padding(16, 12, 0, 12); - tableBindings.RowCount = 7; + tableBindings.RowCount = 8; tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); @@ -316,14 +322,14 @@ namespace GHelper tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); - tableBindings.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); - tableBindings.Size = new Size(972, 346); + tableBindings.RowStyles.Add(new RowStyle()); + tableBindings.Size = new Size(972, 392); tableBindings.TabIndex = 12; // // labelFNE // labelFNE.AutoSize = true; - labelFNE.Location = new Point(16, 288); + labelFNE.Location = new Point(16, 334); labelFNE.Margin = new Padding(0); labelFNE.Name = "labelFNE"; labelFNE.Padding = new Padding(5, 11, 0, 0); @@ -337,23 +343,57 @@ namespace GHelper comboFNE.ButtonColor = Color.FromArgb(255, 255, 255); comboFNE.Dock = DockStyle.Top; comboFNE.FormattingEnabled = true; - comboFNE.Location = new Point(211, 291); + comboFNE.Location = new Point(211, 337); comboFNE.Margin = new Padding(4, 3, 4, 3); comboFNE.Name = "comboFNE"; comboFNE.Size = new Size(374, 40); - comboFNE.TabIndex = 7; + comboFNE.TabIndex = 8; // // textFNE // textFNE.Dock = DockStyle.Top; - textFNE.Location = new Point(593, 291); + textFNE.Location = new Point(593, 337); textFNE.Margin = new Padding(4, 3, 4, 3); textFNE.Name = "textFNE"; textFNE.PlaceholderText = "action"; textFNE.Size = new Size(375, 39); - textFNE.TabIndex = 18; + textFNE.TabIndex = 19; textFNE.TabStop = false; // + // labelFNV + // + labelFNV.AutoSize = true; + labelFNV.Location = new Point(16, 288); + labelFNV.Margin = new Padding(0); + labelFNV.Name = "labelFNV"; + labelFNV.Padding = new Padding(5, 11, 0, 0); + labelFNV.Size = new Size(85, 43); + labelFNV.TabIndex = 15; + labelFNV.Text = "FN+V:"; + // + // comboFNV + // + comboFNV.BorderColor = Color.White; + comboFNV.ButtonColor = Color.FromArgb(255, 255, 255); + comboFNV.Dock = DockStyle.Top; + comboFNV.FormattingEnabled = true; + comboFNV.Location = new Point(211, 291); + comboFNV.Margin = new Padding(4, 3, 4, 3); + comboFNV.Name = "comboFNV"; + comboFNV.Size = new Size(374, 40); + comboFNV.TabIndex = 7; + // + // textFNV + // + textFNV.Dock = DockStyle.Top; + textFNV.Location = new Point(593, 291); + textFNV.Margin = new Padding(4, 3, 4, 3); + textFNV.Name = "textFNV"; + textFNV.PlaceholderText = "action"; + textFNV.Size = new Size(375, 39); + textFNV.TabIndex = 18; + textFNV.TabStop = false; + // // labelFNC // labelFNC.AutoSize = true; @@ -365,6 +405,133 @@ namespace GHelper labelFNC.TabIndex = 15; labelFNC.Text = "FN+C:"; // + // comboFNC + // + comboFNC.BorderColor = Color.White; + comboFNC.ButtonColor = Color.FromArgb(255, 255, 255); + comboFNC.Dock = DockStyle.Top; + comboFNC.FormattingEnabled = true; + comboFNC.Location = new Point(211, 245); + comboFNC.Margin = new Padding(4, 3, 4, 3); + comboFNC.Name = "comboFNC"; + comboFNC.Size = new Size(374, 40); + comboFNC.TabIndex = 6; + // + // textFNC + // + textFNC.Dock = DockStyle.Top; + textFNC.Location = new Point(593, 245); + textFNC.Margin = new Padding(4, 3, 4, 3); + textFNC.Name = "textFNC"; + textFNC.PlaceholderText = "action"; + textFNC.Size = new Size(375, 39); + textFNC.TabIndex = 17; + textFNC.TabStop = false; + // + // labelFNF4 + // + labelFNF4.AutoSize = true; + labelFNF4.Location = new Point(16, 196); + labelFNF4.Margin = new Padding(0); + labelFNF4.Name = "labelFNF4"; + labelFNF4.Padding = new Padding(5, 11, 0, 0); + labelFNF4.Size = new Size(95, 43); + labelFNF4.TabIndex = 6; + labelFNF4.Text = "FN+F4:"; + // + // comboFNF4 + // + comboFNF4.BorderColor = Color.White; + comboFNF4.ButtonColor = Color.FromArgb(255, 255, 255); + comboFNF4.Dock = DockStyle.Top; + comboFNF4.FormattingEnabled = true; + comboFNF4.Location = new Point(211, 199); + comboFNF4.Margin = new Padding(4, 3, 4, 3); + comboFNF4.Name = "comboFNF4"; + comboFNF4.Size = new Size(374, 40); + comboFNF4.TabIndex = 5; + // + // textFNF4 + // + textFNF4.Dock = DockStyle.Top; + textFNF4.Location = new Point(593, 199); + textFNF4.Margin = new Padding(4, 3, 4, 3); + textFNF4.Name = "textFNF4"; + textFNF4.PlaceholderText = "action"; + textFNF4.Size = new Size(375, 39); + textFNF4.TabIndex = 8; + textFNF4.TabStop = false; + // + // comboM4 + // + comboM4.BorderColor = Color.White; + comboM4.ButtonColor = Color.FromArgb(255, 255, 255); + comboM4.Dock = DockStyle.Top; + comboM4.FormattingEnabled = true; + comboM4.Items.AddRange(new object[] { Strings.PerformanceMode, Strings.OpenGHelper, Strings.Custom }); + comboM4.Location = new Point(211, 153); + comboM4.Margin = new Padding(4, 3, 4, 3); + comboM4.Name = "comboM4"; + comboM4.Size = new Size(374, 40); + comboM4.TabIndex = 4; + // + // textM4 + // + textM4.Dock = DockStyle.Top; + textM4.Location = new Point(593, 153); + textM4.Margin = new Padding(4, 3, 4, 3); + textM4.Name = "textM4"; + textM4.PlaceholderText = "action"; + textM4.Size = new Size(375, 39); + textM4.TabIndex = 5; + textM4.TabStop = false; + // + // labelM4 + // + labelM4.AutoSize = true; + labelM4.Location = new Point(16, 150); + labelM4.Margin = new Padding(0); + labelM4.Name = "labelM4"; + labelM4.Padding = new Padding(5, 11, 0, 0); + labelM4.Size = new Size(116, 43); + labelM4.TabIndex = 2; + labelM4.Text = "M4/ROG:"; + // + // comboM3 + // + comboM3.BorderColor = Color.White; + comboM3.ButtonColor = Color.FromArgb(255, 255, 255); + comboM3.Dock = DockStyle.Top; + comboM3.FormattingEnabled = true; + comboM3.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom }); + comboM3.Location = new Point(211, 107); + comboM3.Margin = new Padding(4, 3, 4, 3); + comboM3.Name = "comboM3"; + comboM3.Size = new Size(374, 40); + comboM3.TabIndex = 3; + // + // textM3 + // + textM3.Dock = DockStyle.Top; + textM3.Location = new Point(593, 107); + textM3.Margin = new Padding(4, 3, 4, 3); + textM3.Name = "textM3"; + textM3.PlaceholderText = "action"; + textM3.Size = new Size(375, 39); + textM3.TabIndex = 4; + textM3.TabStop = false; + // + // labelM3 + // + labelM3.AutoSize = true; + labelM3.Location = new Point(16, 104); + labelM3.Margin = new Padding(0); + labelM3.Name = "labelM3"; + labelM3.Padding = new Padding(5, 11, 0, 0); + labelM3.Size = new Size(59, 43); + labelM3.TabIndex = 0; + labelM3.Text = "M3:"; + // // textM2 // textM2.Dock = DockStyle.Top; @@ -376,6 +543,30 @@ namespace GHelper textM2.TabIndex = 14; textM2.TabStop = false; // + // labelM2 + // + labelM2.AutoSize = true; + labelM2.Location = new Point(16, 58); + labelM2.Margin = new Padding(0); + labelM2.Name = "labelM2"; + labelM2.Padding = new Padding(5, 11, 0, 0); + labelM2.Size = new Size(59, 43); + labelM2.TabIndex = 10; + labelM2.Text = "M2:"; + // + // comboM2 + // + comboM2.BorderColor = Color.White; + comboM2.ButtonColor = Color.FromArgb(255, 255, 255); + comboM2.Dock = DockStyle.Top; + comboM2.FormattingEnabled = true; + comboM2.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom }); + comboM2.Location = new Point(211, 61); + comboM2.Margin = new Padding(4, 3, 4, 3); + comboM2.Name = "comboM2"; + comboM2.Size = new Size(374, 40); + comboM2.TabIndex = 2; + // // textM1 // textM1.Dock = DockStyle.Top; @@ -411,157 +602,6 @@ namespace GHelper labelM1.TabIndex = 9; labelM1.Text = "M1:"; // - // comboM4 - // - comboM4.BorderColor = Color.White; - comboM4.ButtonColor = Color.FromArgb(255, 255, 255); - comboM4.Dock = DockStyle.Top; - comboM4.FormattingEnabled = true; - comboM4.Items.AddRange(new object[] { Strings.PerformanceMode, Strings.OpenGHelper, Strings.Custom }); - comboM4.Location = new Point(211, 153); - comboM4.Margin = new Padding(4, 3, 4, 3); - comboM4.Name = "comboM4"; - comboM4.Size = new Size(374, 40); - comboM4.TabIndex = 4; - // - // comboM3 - // - comboM3.BorderColor = Color.White; - comboM3.ButtonColor = Color.FromArgb(255, 255, 255); - comboM3.Dock = DockStyle.Top; - comboM3.FormattingEnabled = true; - comboM3.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom }); - comboM3.Location = new Point(211, 107); - comboM3.Margin = new Padding(4, 3, 4, 3); - comboM3.Name = "comboM3"; - comboM3.Size = new Size(374, 40); - comboM3.TabIndex = 3; - // - // textM4 - // - textM4.Dock = DockStyle.Top; - textM4.Location = new Point(593, 153); - textM4.Margin = new Padding(4, 3, 4, 3); - textM4.Name = "textM4"; - textM4.PlaceholderText = "action"; - textM4.Size = new Size(375, 39); - textM4.TabIndex = 5; - textM4.TabStop = false; - // - // textM3 - // - textM3.Dock = DockStyle.Top; - textM3.Location = new Point(593, 107); - textM3.Margin = new Padding(4, 3, 4, 3); - textM3.Name = "textM3"; - textM3.PlaceholderText = "action"; - textM3.Size = new Size(375, 39); - textM3.TabIndex = 4; - textM3.TabStop = false; - // - // labelM4 - // - labelM4.AutoSize = true; - labelM4.Location = new Point(16, 150); - labelM4.Margin = new Padding(0); - labelM4.Name = "labelM4"; - labelM4.Padding = new Padding(5, 11, 0, 0); - labelM4.Size = new Size(116, 43); - labelM4.TabIndex = 2; - labelM4.Text = "M4/ROG:"; - // - // labelM3 - // - labelM3.AutoSize = true; - labelM3.Location = new Point(16, 104); - labelM3.Margin = new Padding(0); - labelM3.Name = "labelM3"; - labelM3.Padding = new Padding(5, 11, 0, 0); - labelM3.Size = new Size(59, 43); - labelM3.TabIndex = 0; - labelM3.Text = "M3:"; - // - // labelM2 - // - labelM2.AutoSize = true; - labelM2.Location = new Point(16, 58); - labelM2.Margin = new Padding(0); - labelM2.Name = "labelM2"; - labelM2.Padding = new Padding(5, 11, 0, 0); - labelM2.Size = new Size(59, 43); - labelM2.TabIndex = 10; - labelM2.Text = "M2:"; - // - // comboM2 - // - comboM2.BorderColor = Color.White; - comboM2.ButtonColor = Color.FromArgb(255, 255, 255); - comboM2.Dock = DockStyle.Top; - comboM2.FormattingEnabled = true; - comboM2.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom }); - comboM2.Location = new Point(211, 61); - comboM2.Margin = new Padding(4, 3, 4, 3); - comboM2.Name = "comboM2"; - comboM2.Size = new Size(374, 40); - comboM2.TabIndex = 2; - // - // labelFNF4 - // - labelFNF4.AutoSize = true; - labelFNF4.Location = new Point(16, 196); - labelFNF4.Margin = new Padding(0); - labelFNF4.Name = "labelFNF4"; - labelFNF4.Padding = new Padding(5, 11, 0, 0); - labelFNF4.Size = new Size(95, 43); - labelFNF4.TabIndex = 6; - labelFNF4.Text = "FN+F4:"; - // - // comboFNF4 - // - comboFNF4.BorderColor = Color.White; - comboFNF4.ButtonColor = Color.FromArgb(255, 255, 255); - comboFNF4.Dock = DockStyle.Top; - comboFNF4.FormattingEnabled = true; - comboFNF4.Location = new Point(211, 199); - comboFNF4.Margin = new Padding(4, 3, 4, 3); - comboFNF4.Name = "comboFNF4"; - comboFNF4.Size = new Size(374, 40); - comboFNF4.TabIndex = 5; - // - // textFNF4 - // - textFNF4.Dock = DockStyle.Top; - textFNF4.Location = new Point(593, 199); - textFNF4.Margin = new Padding(4, 3, 4, 3); - textFNF4.Name = "textFNF4"; - textFNF4.PlaceholderText = "action"; - textFNF4.Size = new Size(375, 39); - textFNF4.TabIndex = 8; - textFNF4.TabStop = false; - // - // comboFNC - // - comboFNC.BorderColor = Color.White; - comboFNC.ButtonColor = Color.FromArgb(255, 255, 255); - comboFNC.Dock = DockStyle.Top; - comboFNC.FormattingEnabled = true; - comboFNC.Location = new Point(211, 245); - comboFNC.Margin = new Padding(4, 3, 4, 3); - comboFNC.Name = "comboFNC"; - comboFNC.Size = new Size(374, 40); - comboFNC.TabIndex = 6; - // - // textFNC - // - textFNC.Dock = DockStyle.Top; - textFNC.Location = new Point(593, 245); - textFNC.Margin = new Padding(4, 3, 4, 3); - textFNC.Name = "textFNC"; - textFNC.PlaceholderText = "action"; - textFNC.Size = new Size(375, 39); - textFNC.TabIndex = 17; - textFNC.TabStop = false; - // // tableKeys // tableKeys.ColumnCount = 3; @@ -588,7 +628,7 @@ namespace GHelper panelBacklightHeader.Controls.Add(pictureBacklight); panelBacklightHeader.Controls.Add(labelBacklightTitle); panelBacklightHeader.Dock = DockStyle.Top; - panelBacklightHeader.Location = new Point(15, 417); + panelBacklightHeader.Location = new Point(15, 463); panelBacklightHeader.Name = "panelBacklightHeader"; panelBacklightHeader.Padding = new Padding(11, 5, 11, 5); panelBacklightHeader.Size = new Size(983, 51); @@ -636,7 +676,7 @@ namespace GHelper panelBacklight.Controls.Add(panelXMG); panelBacklight.Controls.Add(tableBacklight); panelBacklight.Dock = DockStyle.Top; - panelBacklight.Location = new Point(15, 468); + panelBacklight.Location = new Point(15, 514); panelBacklight.Name = "panelBacklight"; panelBacklight.Padding = new Padding(0, 5, 0, 5); panelBacklight.Size = new Size(983, 402); @@ -1026,7 +1066,7 @@ namespace GHelper panelSettingsHeader.Controls.Add(pictureSettings); panelSettingsHeader.Controls.Add(labelSettings); panelSettingsHeader.Dock = DockStyle.Top; - panelSettingsHeader.Location = new Point(15, 870); + panelSettingsHeader.Location = new Point(15, 916); panelSettingsHeader.Name = "panelSettingsHeader"; panelSettingsHeader.Padding = new Padding(11, 5, 11, 5); panelSettingsHeader.Size = new Size(983, 51); @@ -1093,7 +1133,7 @@ namespace GHelper panelSettings.Controls.Add(checkGpuApps); panelSettings.Controls.Add(checkGPUFix); panelSettings.Dock = DockStyle.Top; - panelSettings.Location = new Point(15, 1108); + panelSettings.Location = new Point(15, 1154); panelSettings.Name = "panelSettings"; panelSettings.Padding = new Padding(20, 5, 11, 5); panelSettings.Size = new Size(983, 346); @@ -1208,7 +1248,7 @@ namespace GHelper panelPower.Controls.Add(labelHibernateAfter); panelPower.Controls.Add(pictureHibernate); panelPower.Dock = DockStyle.Top; - panelPower.Location = new Point(15, 1454); + panelPower.Location = new Point(15, 1500); panelPower.Name = "panelPower"; panelPower.Size = new Size(983, 54); panelPower.TabIndex = 4; @@ -1251,7 +1291,7 @@ namespace GHelper panelAPU.Controls.Add(pictureAPUMem); panelAPU.Controls.Add(labelAPUMem); panelAPU.Dock = DockStyle.Top; - panelAPU.Location = new Point(15, 1051); + panelAPU.Location = new Point(15, 1097); panelAPU.Name = "panelAPU"; panelAPU.Padding = new Padding(11, 5, 11, 0); panelAPU.Size = new Size(983, 57); @@ -1305,7 +1345,7 @@ namespace GHelper panelCores.Controls.Add(pictureCores); panelCores.Controls.Add(label1); panelCores.Dock = DockStyle.Top; - panelCores.Location = new Point(15, 990); + panelCores.Location = new Point(15, 1036); panelCores.Name = "panelCores"; panelCores.Padding = new Padding(11, 5, 11, 0); panelCores.Size = new Size(983, 61); @@ -1390,7 +1430,7 @@ namespace GHelper panelACPI.Controls.Add(pictureDebug); panelACPI.Controls.Add(labelACPITitle); panelACPI.Dock = DockStyle.Top; - panelACPI.Location = new Point(15, 921); + panelACPI.Location = new Point(15, 967); panelACPI.Name = "panelACPI"; panelACPI.Padding = new Padding(11, 5, 11, 0); panelACPI.Size = new Size(983, 69); @@ -1461,7 +1501,7 @@ namespace GHelper AutoScroll = true; AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; - ClientSize = new Size(1013, 1612); + ClientSize = new Size(1013, 1668); Controls.Add(panelServices); Controls.Add(panelPower); Controls.Add(panelSettings); @@ -1538,6 +1578,7 @@ namespace GHelper private Panel panelBindings; private TableLayoutPanel tableBindings; private Label labelFNC; + private Label labelFNV; private TextBox textM2; private TextBox textM1; private RComboBox comboM1; @@ -1554,7 +1595,9 @@ namespace GHelper private RComboBox comboFNF4; private TextBox textFNF4; private RComboBox comboFNC; + private RComboBox comboFNV; private TextBox textFNC; + private TextBox textFNV; private PictureBox pictureHelp; private TableLayoutPanel tableKeys; private PictureBox pictureBindings; diff --git a/app/Extra.cs b/app/Extra.cs index 155774a7..3176c97f 100644 --- a/app/Extra.cs +++ b/app/Extra.cs @@ -34,6 +34,7 @@ namespace GHelper {"fnlock", Properties.Strings.ToggleFnLock}, {"brightness_down", Properties.Strings.BrightnessDown}, {"brightness_up", Properties.Strings.BrightnessUp}, + {"visual", Properties.Strings.VisualMode}, {"ghelper", Properties.Strings.OpenGHelper}, {"custom", Properties.Strings.Custom} }; @@ -72,6 +73,9 @@ namespace GHelper customActions[""] = Properties.Strings.ToggleFnLock; customActions.Remove("fnlock"); break; + case "fnv": + customActions[""] = EMPTY; + break; case "fne": customActions[""] = "Calculator"; break; @@ -160,6 +164,7 @@ namespace GHelper comboM4.AccessibleName = "M4 Action"; comboFNF4.AccessibleName = "Fn+F4 Action"; comboFNC.AccessibleName = "Fn+C Action"; + comboFNV.AccessibleName = "Fn+V Action"; comboFNE.AccessibleName = "Fn+Numpad Action"; numericBacklightPluggedTime.AccessibleName = Properties.Strings.BacklightTimeoutPlugged; @@ -232,6 +237,10 @@ namespace GHelper comboFNC.Visible = false; textFNC.Visible = false; + labelFNV.Visible = false; + comboFNV.Visible = false; + textFNV.Visible = false; + SetKeyCombo(comboM3, textM3, "cc"); SetKeyCombo(comboM4, textM4, "m4"); SetKeyCombo(comboFNF4, textFNF4, "paddle"); @@ -262,6 +271,7 @@ namespace GHelper SetKeyCombo(comboFNF4, textFNF4, "fnf4"); SetKeyCombo(comboFNC, textFNC, "fnc"); + SetKeyCombo(comboFNV, textFNV, "fnv"); SetKeyCombo(comboFNE, textFNE, "fne"); } diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs index b3746d2c..e96a6aa3 100644 --- a/app/Input/InputDispatcher.cs +++ b/app/Input/InputDispatcher.cs @@ -485,6 +485,9 @@ namespace GHelper.Input case "aura": Program.settingsForm.BeginInvoke(Program.settingsForm.CycleAuraMode); break; + case "visual": + Program.settingsForm.BeginInvoke(Program.settingsForm.CycleVisualMode); + break; case "performance": modeControl.CyclePerformanceMode(Control.ModifierKeys == Keys.Shift); break; @@ -660,6 +663,9 @@ namespace GHelper.Input case 178: // FN+F4 KeyProcess("fnf4"); return; + case 138: // Fn + V + KeyProcess("fnv"); + return; case 158: // Fn + C KeyProcess("fnc"); return; diff --git a/app/Settings.cs b/app/Settings.cs index 685d089c..76f92dfd 100644 --- a/app/Settings.cs +++ b/app/Settings.cs @@ -344,6 +344,16 @@ namespace GHelper } + public void CycleVisualMode() + { + if (comboVisual.SelectedIndex < comboVisual.Items.Count - 1) + comboVisual.SelectedIndex += 1; + else + comboVisual.SelectedIndex = 0; + + Program.toast.RunToast(comboVisual.GetItemText(comboVisual.SelectedItem), ToastIcon.BrightnessUp); + } + private async void ButtonInstallColorProfile_Click(object? sender, EventArgs e) { await ColorProfileHelper.InstallProfile();