Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
converted to new format
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Nov 23, 2016
1 parent 1d1e072 commit 2d347d9
Show file tree
Hide file tree
Showing 16 changed files with 216 additions and 118 deletions.
Binary file modified .vs/QMK/v14/.suo
Binary file not shown.
277 changes: 187 additions & 90 deletions QMK Helper/Keyboard.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion QMK Helper/Options.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 19 additions & 18 deletions QMK Helper/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public Options() {
if (Keyboard.available_keyboards.Contains(Properties.Settings.Default.Keyboard))
availableKeyboards.SelectedItem = Properties.Settings.Default.Keyboard;

Keyboard.updateInput();
Keyboard.updateOutput();
//Keyboard.updateInput();
//Keyboard.updateOutput();
Reinit();
}

Expand All @@ -65,10 +65,10 @@ public void Reinit() {
layer_labels[i].BackColor = System.Drawing.Color.FromName("ControlLight");
}

Keyboard.sendBytes(new byte[] { 0x13, 0x02 }); // Get layers
Keyboard.sendBytes(new byte[] { 0x13, 0x03 }); // Get layers
Keyboard.sendBytes(new byte[] { 0x13, 0x07 }); // Get RGB
Keyboard.sendBytes(new byte[] { 0x13, 0x08 }); // Get Keymap Options
Keyboard.MT_GET_DATA(Keyboard.DT.DEFAULT_LAYER, null);
Keyboard.MT_GET_DATA(Keyboard.DT.CURRENT_LAYER, null);
Keyboard.MT_GET_DATA(Keyboard.DT.RGBLIGHT, null);
Keyboard.MT_GET_DATA(Keyboard.DT.KEYMAP_OPTIONS, null);
}

public void updateKeymapCheckbox(int i, bool enabled) {
Expand Down Expand Up @@ -208,7 +208,7 @@ private void tableLayoutPanel_Paint(object sender, PaintEventArgs e) {
}

private void button2_Click(object sender, EventArgs e) {
Keyboard.sendBytes(new byte[] { 0x13, 0x04 });
Keyboard.MT_GET_DATA(Keyboard.DT.CURRENT_LAYER);
}

private void label7_Click(object sender, EventArgs e) {
Expand Down Expand Up @@ -241,18 +241,19 @@ private void AboutBox_Load(object sender, EventArgs e) {

private void RGBLightMode_SelectedIndexChanged(object sender, EventArgs e) {
ComboBox comboBox = (ComboBox)sender;
Keyboard.sendBytes(new byte[] { 0x27, 0x02, (byte)(comboBox.SelectedIndex + 1) });
}

private void label19_Click(object sender, EventArgs e) {

//if (Keyboard.rgb_state != null) {
Keyboard.rgb_state.mode = (byte)(comboBox.SelectedIndex + 1);
Keyboard.MT_SET_DATA(Keyboard.DT.RGBLIGHT, Keyboard.rgb_state.bytes);
//}
}

private void button1_Click(object sender, EventArgs e) {
if (colorDialog1.ShowDialog() == DialogResult.OK) {
button1.BackColor = colorDialog1.Color;
byte[] chunk = Keyboard.prepareHSVChunk((uint)button1.BackColor.GetHue(), (uint)(button1.BackColor.GetSaturation() * 255), (uint)(button1.BackColor.GetBrightness() * 255));
Keyboard.sendBytes(new byte[] { 0x27, 0x00, chunk[0], chunk[1], chunk[2], chunk[3] });
Keyboard.rgb_state.hue = (ushort)button1.BackColor.GetHue();
Keyboard.rgb_state.sat = (byte)(button1.BackColor.GetSaturation() * 255);
Keyboard.rgb_state.val = (byte)(button1.BackColor.GetBrightness() * 255);
Keyboard.MT_SET_DATA(Keyboard.DT.RGBLIGHT, Keyboard.rgb_state.bytes);
if (button1.BackColor.GetBrightness() > 0.5)
button1.ForeColor = System.Drawing.Color.Black;
else
Expand All @@ -271,9 +272,7 @@ private void label2_Click(object sender, EventArgs e) {
Keyboard.default_layer ^= (uint)(1 << i);
}
}
byte[] chunk = Keyboard.encode_uint8_chunk(Keyboard.default_layer);
Keyboard.sendBytes(new byte[] { 0x12, 0x02, chunk[0], chunk[1] });
Keyboard.sendBytes(new byte[] { 0x13, 0x02 });
Keyboard.MT_SET_DATA(Keyboard.DT.DEFAULT_LAYER, new byte[] { (byte)Keyboard.default_layer });
}

private void availableKeyboards_SelectedValueChanged(object sender, EventArgs e) {
Expand All @@ -290,7 +289,9 @@ private void button3_Click(object sender, EventArgs e) {
}

private void RGBLightCheckBox_CheckedChanged(object sender, EventArgs e) {

CheckBox box = (CheckBox)sender;
Keyboard.rgb_state.enabled = box.Checked;
Keyboard.MT_SET_DATA(Keyboard.DT.RGBLIGHT, Keyboard.rgb_state.bytes);
}
}
}
2 changes: 1 addition & 1 deletion QMK Helper/bin/Debug/QMK Helper.application
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>ObtjqOh3sABNX8ez9LML9ShSYPo=</dsig:DigestValue>
<dsig:DigestValue>IIYiIzzCEFeCjyr9Fmn5NpeVc14=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified QMK Helper/bin/Debug/QMK Helper.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions QMK Helper/bin/Debug/QMK Helper.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QMK Helper.exe" size="549376">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QMK Helper.exe" size="550912">
<assemblyIdentity name="QMK Helper" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>l1uWIEiP2P7XiXwlPRmzlL+7I5w=</dsig:DigestValue>
<dsig:DigestValue>P6Af0DMHyGU5ylt+3L+Bwy3EvjQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified QMK Helper/bin/Debug/QMK Helper.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion QMK Helper/bin/Debug/QMK Helper.vshost.application
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>ObtjqOh3sABNX8ez9LML9ShSYPo=</dsig:DigestValue>
<dsig:DigestValue>IIYiIzzCEFeCjyr9Fmn5NpeVc14=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions QMK Helper/bin/Debug/QMK Helper.vshost.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QMK Helper.exe" size="549376">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QMK Helper.exe" size="550912">
<assemblyIdentity name="QMK Helper" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>l1uWIEiP2P7XiXwlPRmzlL+7I5w=</dsig:DigestValue>
<dsig:DigestValue>P6Af0DMHyGU5ylt+3L+Bwy3EvjQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified QMK Helper/bin/Debug/app.publish/QMK Helper.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion QMK Helper/obj/x86/Debug/QMK Helper.application
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>ObtjqOh3sABNX8ez9LML9ShSYPo=</dsig:DigestValue>
<dsig:DigestValue>IIYiIzzCEFeCjyr9Fmn5NpeVc14=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified QMK Helper/obj/x86/Debug/QMK Helper.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions QMK Helper/obj/x86/Debug/QMK Helper.exe.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QMK Helper.exe" size="549376">
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="QMK Helper.exe" size="550912">
<assemblyIdentity name="QMK Helper" version="1.0.0.0" language="neutral" processorArchitecture="x86" />
<hash>
<dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<dsig:DigestValue>l1uWIEiP2P7XiXwlPRmzlL+7I5w=</dsig:DigestValue>
<dsig:DigestValue>P6Af0DMHyGU5ylt+3L+Bwy3EvjQ=</dsig:DigestValue>
</hash>
</dependentAssembly>
</dependency>
Expand Down
Binary file modified QMK Helper/obj/x86/Debug/QMK Helper.pdb
Binary file not shown.
Binary file modified QMK Helper/obj/x86/Debug/QMK.csproj.GenerateResource.Cache
Binary file not shown.

0 comments on commit 2d347d9

Please sign in to comment.