Skip to content

Commit

Permalink
Added: Joystick (send custom key, event management)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdalmoez committed May 7, 2020
1 parent 70a7a68 commit aaa7bb7
Show file tree
Hide file tree
Showing 12 changed files with 649 additions and 219 deletions.
82 changes: 65 additions & 17 deletions SerialShell/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,106 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<userSettings>
<SerialShell.Properties.Settings>
<SerialShell.Properties.Settings>
<setting name="Button1" serializeAs="String">
<value>BUTTON1</value>
<value>1</value>
</setting>
<setting name="Button2" serializeAs="String">
<value>BUTTON2</value>
<value>2</value>
</setting>
<setting name="Button3" serializeAs="String">
<value>BUTTON3</value>
<value>3</value>
</setting>
<setting name="Button4" serializeAs="String">
<value>BUTTON4</value>
<value>4</value>
</setting>
<setting name="Left1" serializeAs="String">
<value>LEFT1</value>
<value>5</value>
</setting>
<setting name="Right1" serializeAs="String">
<value>RIGHT1</value>
<value>6</value>
</setting>
<setting name="Left2" serializeAs="String">
<value>LEFT2</value>
<value>7</value>
</setting>
<setting name="Right2" serializeAs="String">
<value>RIGHT2</value>
<value>8</value>
</setting>
<setting name="Select" serializeAs="String">
<value>SELECT</value>
<value>9</value>
</setting>
<setting name="Start" serializeAs="String">
<value>START</value>
<value>10</value>
</setting>
<setting name="Up" serializeAs="String">
<value>UP</value>
<value>11</value>
</setting>
<setting name="Down" serializeAs="String">
<value>DOWN</value>
<value>12</value>
</setting>
<setting name="Left" serializeAs="String">
<value>LEFT</value>
<value>13</value>
</setting>
<setting name="Right" serializeAs="String">
<value>RIGHT</value>
<value>14</value>
</setting>
<setting name="LeftAnalogMid" serializeAs="String">
<value>LEFTANALOGMID</value>
<value>15</value>
</setting>
<setting name="RightAnalogMid" serializeAs="String">
<value>RIGHTANALOGMID</value>
<value>16</value>
</setting>
<setting name="SendEndOfLineChar" serializeAs="String">
<value>False</value>
</setting>
<setting name="Button1Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="Button2Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="Button3Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="Button4Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="Left1Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="Right1Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="Left2Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="Right2Repeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="SelectRepeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="StartRepeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="UpRepeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="DownRepeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="LeftRepeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="RightRepeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="LeftAnalogMidRepeat" serializeAs="String">
<value>False</value>
</setting>
<setting name="RightAnalogMidRepeat" serializeAs="String">
<value>False</value>
</setting>
</SerialShell.Properties.Settings>
</userSettings>
</configuration>
36 changes: 36 additions & 0 deletions SerialShell/JoyButton.Designer.cs

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

28 changes: 28 additions & 0 deletions SerialShell/JoyButton.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SerialShell
{
public partial class JoyButton : System.Windows.Forms.Button
{
public bool repeatcode { get; set; }
public bool pressed { get; set; }
public byte code;
public JoyButton()
{
InitializeComponent();
}

public JoyButton(IContainer container)
{
container.Add(this);

InitializeComponent();
}
}
}
Loading

0 comments on commit aaa7bb7

Please sign in to comment.