fkdriver

fkdriver Commit Details


Date:2013-08-18 22:21:00 (11 years 4 months ago)
Author:Natalie Adams
Branch:default
Commit:d4c86e665668
Message:Migration from Google code

Changes:
AFreedomKeyboard.sln (full)
AFreedomKeyboard/Form1.Designer.cs (full)
AFreedomKeyboard/Form1.cs (full)
AFreedomKeyboard/Form1.resx (full)
AFreedomKeyboard/FreedomKeyboard.csproj (full)
AFreedomKeyboard/FreedomKeyboard.csproj.user (full)
AFreedomKeyboard/Keyboard.cs (full)
AFreedomKeyboard/Program.cs (full)
AFreedomKeyboard/Properties/AssemblyInfo.cs (full)
AFreedomKeyboard/Properties/Resources.Designer.cs (full)
AFreedomKeyboard/Properties/Resources.resx (full)
AFreedomKeyboard/bin/Debug/FreedomKeyboard.exe
AFreedomKeyboard/bin/Debug/FreedomKeyboard.pdb
AFreedomKeyboard/bin/Release/FreedomKeyboard.exe
AFreedomKeyboard/bin/Release/FreedomKeyboard.pdb
AFreedomKeyboard/keys.txt (full)
AFreedomKeyboard/obj/Debug/FreedomKeyboard.Properties.Resources.resources
AFreedomKeyboard/obj/Debug/FreedomKeyboard.csproj.FileListAbsolute.txt (full)
AFreedomKeyboard/obj/Debug/FreedomKeyboard.csproj.GenerateResource.Cache
AFreedomKeyboard/obj/Debug/FreedomKeyboard.exe
AFreedomKeyboard/obj/Debug/FreedomKeyboard.frmMain.resources
AFreedomKeyboard/obj/Release/FreedomKeyboard.Properties.Resources.resources
AFreedomKeyboard/obj/Release/FreedomKeyboard.csproj.FileListAbsolute.txt (full)
AFreedomKeyboard/obj/Release/FreedomKeyboard.csproj.GenerateResource.Cache
AFreedomKeyboard/obj/Release/FreedomKeyboard.exe
AFreedomKeyboard/obj/Release/FreedomKeyboard.frmMain.resources
AFreedomKeyboard/obj/Release/FreedomKeyboard.pdb

File differences

FreedomKeyboard.sln
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreedomKeyboard", "FreedomKeyboard\FreedomKeyboard.csproj", "{2DE3F1A7-336A-4C8B-B169-0525E6789A25}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2DE3F1A7-336A-4C8B-B169-0525E6789A25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2DE3F1A7-336A-4C8B-B169-0525E6789A25}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2DE3F1A7-336A-4C8B-B169-0525E6789A25}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{2DE3F1A7-336A-4C8B-B169-0525E6789A25}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2DE3F1A7-336A-4C8B-B169-0525E6789A25}.Release|Any CPU.Build.0 = Release|Any CPU
{2DE3F1A7-336A-4C8B-B169-0525E6789A25}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
FreedomKeyboard/Form1.Designer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
namespace FreedomKeyboard
{
partial class frmMain
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.MainMenu mainMenu1;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.mnuExit = new System.Windows.Forms.MenuItem();
this.txtKey = new System.Windows.Forms.TextBox();
this.lblDetect = new System.Windows.Forms.Label();
this.spKey = new System.IO.Ports.SerialPort(this.components);
this.btnStart = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.Add(this.menuItem1);
this.mainMenu1.MenuItems.Add(this.mnuExit);
//
// menuItem1
//
this.menuItem1.Text = "Options";
//
// mnuExit
//
this.mnuExit.Text = "Exit";
this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click);
//
// txtKey
//
this.txtKey.Location = new System.Drawing.Point(136, 20);
this.txtKey.Name = "txtKey";
this.txtKey.Size = new System.Drawing.Size(100, 21);
this.txtKey.TabIndex = 0;
//
// lblDetect
//
this.lblDetect.Location = new System.Drawing.Point(3, 20);
this.lblDetect.Name = "lblDetect";
this.lblDetect.Size = new System.Drawing.Size(127, 20);
this.lblDetect.Text = "Detected Key Press:";
//
// spKey
//
this.spKey.BaudRate = 115200;
//
// btnStart
//
this.btnStart.Location = new System.Drawing.Point(111, 47);
this.btnStart.Name = "btnStart";
this.btnStart.Size = new System.Drawing.Size(125, 40);
this.btnStart.TabIndex = 1;
this.btnStart.Text = "Start";
this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
//
// frmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(240, 268);
this.Controls.Add(this.btnStart);
this.Controls.Add(this.lblDetect);
this.Controls.Add(this.txtKey);
this.Menu = this.mainMenu1;
this.Name = "frmMain";
this.Text = "FreedomKeyboard Driver";
this.Load += new System.EventHandler(this.frmMain_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem mnuExit;
private System.Windows.Forms.TextBox txtKey;
private System.Windows.Forms.Label lblDetect;
private System.IO.Ports.SerialPort spKey;
private System.Windows.Forms.Button btnStart;
}
}
FreedomKeyboard/Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace FreedomKeyboard
{
public partial class frmMain : Form
{
private Keyboard fk;
public frmMain()
{
InitializeComponent();
}
private void mnuExit_Click(object sender, EventArgs e)
{
this.Close();
}
private void frmMain_Load(object sender, EventArgs e)
{
fk = new Keyboard();
this.spKey.DataReceived += new SerialDataReceivedEventHandler(SerialEvent);
//fk.RawKeyPress_Event += new Keyboard.KeyPress(data);
}
private void btnStart_Click(object sender, EventArgs e)
{
//fk.Enable = true;
this.spKey.Open();
}
private void data(string e)
{
this.txtKey.Text = e.ToString();
}
private void SerialEvent(object sender, SerialDataReceivedEventArgs e)
{
//string s = "";
//s = new string((char)this.spKey.ReadChar(), 1);
char x;
while (spKey.BytesToRead != 0)
{
x = (char)spKey.ReadChar();
this.fk.Key(x);
//this.fk.Key((char)spKey.ReadChar());
}
//MessageBox.Show(s);
}
}
}
FreedomKeyboard/Form1.resx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="spKey.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>126, 17</value>
</metadata>
<metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
<value>Pocket_PC</value>
</metadata>
<metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
FreedomKeyboard/FreedomKeyboard.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2DE3F1A7-336A-4C8B-B169-0525E6789A25}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>FreedomKeyboard</RootNamespace>
<AssemblyName>FreedomKeyboard</AssemblyName>
<ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<PlatformFamilyName>PocketPC</PlatformFamilyName>
<PlatformID>b2c48bd2-963d-4549-9169-1fa021dce484</PlatformID>
<OSVersion>5.2</OSVersion>
<DeployDirSuffix>FreedomKeyboard</DeployDirSuffix>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<NativePlatformName>Windows Mobile 6 Professional SDK</NativePlatformName>
<FormFactorID>
</FormFactorID>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;$(PlatformFamilyName)</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<FileAlignment>512</FileAlignment>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;$(PlatformFamilyName)</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<FileAlignment>512</FileAlignment>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Keyboard.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="keys.txt" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
<HostingProcess disable="1" />
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
FreedomKeyboard/FreedomKeyboard.csproj.user
1
2
3
4
5
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<DeployDeviceID>b2c48bd2-963d-4549-9169-1fa021dce484d6518ffb-710f-11d3-99f2-00105a0df099</DeployDeviceID>
</PropertyGroup>
</Project>
FreedomKeyboard/Keyboard.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Data;
using System.IO.Ports;
using System.Collections;
using System.IO;
using System.Runtime.InteropServices;
namespace FreedomKeyboard
{
class Keyboard
{
[DllImport("coredll.dll")]
static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
//public event ParseKey KeyPress_Event;
//public delegate void ParseKey(string key);
//private char k1;
//private char k2;
SortedList keys = new SortedList();
private bool shift = false;
//private bool rshift = false;
public Keyboard()
{
//Keys ky = new Keys();
//ky = (Keys)Enum.Parse(ky.GetType(), "a", false);
StreamReader sr = new StreamReader("\\keys.txt");
string strLine;
string[] tmp;
while ((strLine = sr.ReadLine()) != null)
{
try
{
tmp = strLine.Split(':');
keys.Add(tmp[0], Int32.Parse(tmp[1]));
}
catch (Exception e)
{
}
}
//keys.
//this.ser = sp;
//this.ser.DataReceived += new SerialDataReceivedEventHandler(this.SerialEvent);
}
public void Key(char key)
{
const int KEYEVENTF_KEYPRESS = 0x0000;
const int KEYEVENTF_KEYUP = 0x0002;
const int VK_LSHIFT = 0xA0;
const int VK_RSHIFT = 0xA1;
if ((int)key == 59 || (int)key == 60)
{
shift = true;
return;
}
if ((int)key == 122 || (int)key == 123)
{
shift = false;
return;
}
if ((int)key == 95)
{
keybd_event((byte)Keys.Back, 0, KEYEVENTF_KEYPRESS, 0);
keybd_event((byte)Keys.Back, 0, KEYEVENTF_KEYUP, 0);
}
if ((int)key == 85 || (int)key == 116)
{
keybd_event((byte)Keys.Space, 0, KEYEVENTF_KEYPRESS, 0);
keybd_event((byte)Keys.Space, 0, KEYEVENTF_KEYUP, 0);
}
Keys ky = new Keys();
//Keys.spa
string keyx;
if (this.keys.ContainsValue((int)key))
{
IDictionaryEnumerator _enumerator = keys.GetEnumerator();
while (_enumerator.MoveNext())
{
if ((int)_enumerator.Value == (int)key)
{
keyx = (string)_enumerator.Key;
try
{
ky = (Keys)Enum.Parse(ky.GetType(), keyx.ToUpper(), false);
}
catch (Exception e)
{
ky = (Keys)Enum.Parse(ky.GetType(), keyx, false);
}
if (shift)
keybd_event(VK_LSHIFT, 0, KEYEVENTF_KEYPRESS, 0);
keybd_event((byte)ky, 0, KEYEVENTF_KEYPRESS, 0);
keybd_event((byte)ky, 0, KEYEVENTF_KEYUP, 0);
if (shift)
keybd_event(VK_LSHIFT, 0, KEYEVENTF_KEYUP, 0);
}
}
}
}
}
}
FreedomKeyboard/Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;
namespace FreedomKeyboard
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[MTAThread]
static void Main()
{
Application.Run(new frmMain());
}
}
}
FreedomKeyboard/Properties/AssemblyInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("FreedomKeyboard")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FreedomKeyboard")]
[assembly: AssemblyCopyright("Copyright © 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cd97fb09-1769-4d13-b339-bd7cd6e4a896")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
// Below attribute is to suppress FxCop warning "CA2232 : Microsoft.Usage : Add STAThreadAttribute to assembly"
// as Device app does not support STA thread.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2232:MarkWindowsFormsEntryPointsWithStaThread")]
FreedomKeyboard/Properties/Resources.Designer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
namespace FreedomKeyboard.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the Strongly Typed Resource Builder
// class via a tool like ResGen or Visual Studio.NET.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
class Resources
{
private static System.Resources.ResourceManager _resMgr;
private static System.Globalization.CultureInfo _resCulture;
/*FamANDAssem*/
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public static System.Resources.ResourceManager ResourceManager
{
get
{
if ((_resMgr == null))
{
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("FreedomKeyboard.Properties.Resources", typeof(Resources).Assembly);
_resMgr = temp;
}
return _resMgr;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
public static System.Globalization.CultureInfo Culture
{
get
{
return _resCulture;
}
set
{
_resCulture = value;
}
}
}
}
FreedomKeyboard/Properties/Resources.resx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
FreedomKeyboard/keys.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
D0:92
D1:64
D2:65
D3:66
D4:67
D5:68
D6:69
D7:89
D8:90
D9:91
a:75
b:84
c:82
d:77
e:72
f:78
g:79
h:103
i:98
j:104
k:105
l:106
m:111
n:110
o:99
p:100
q:70
r:73
s:76
t:74
u:97
v:83
w:71
x:81
y:96
z:80
Space:85
Space:116
Tab:86
CapsLock:87
FreedomKeyboard/obj/Debug/FreedomKeyboard.csproj.FileListAbsolute.txt
1
2
3
4
5
6
7
8
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\bin\Debug\FreedomKeyboard.exe
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\bin\Debug\FreedomKeyboard.pdb
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Debug\ResolveAssemblyReference.cache
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Debug\FreedomKeyboard.frmMain.resources
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Debug\FreedomKeyboard.Properties.Resources.resources
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Debug\FreedomKeyboard.csproj.GenerateResource.Cache
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Debug\FreedomKeyboard.exe
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Debug\FreedomKeyboard.pdb
FreedomKeyboard/obj/Release/FreedomKeyboard.csproj.FileListAbsolute.txt
1
2
3
4
5
6
7
8
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\bin\Release\FreedomKeyboard.exe
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\bin\Release\FreedomKeyboard.pdb
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Release\ResolveAssemblyReference.cache
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Release\FreedomKeyboard.frmMain.resources
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Release\FreedomKeyboard.Properties.Resources.resources
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Release\FreedomKeyboard.csproj.GenerateResource.Cache
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Release\FreedomKeyboard.exe
C:\Users\nathan\Documents\Visual Studio 2008\Projects\FreedomKeyboard\FreedomKeyboard\obj\Release\FreedomKeyboard.pdb

Archive Download the corresponding diff file

Branches

Tags

Page rendered in 0.47518s using 14 queries.