diff --git a/LanguageGenerator/Program.cs b/LanguageGenerator/Program.cs
index 5d2f360..e758ae1 100644
--- a/LanguageGenerator/Program.cs
+++ b/LanguageGenerator/Program.cs
@@ -17,16 +17,16 @@ namespace LanguageGenerator
{
private static readonly char[,] smallCharacters = new char[4, 8]
{
- {'k', 's', 'i', 'n', 'e', 'l', 'a', 't'},
- {'g', 'b', 'm', 'o', 'z', 'r', 'y', 'v'},
- {'x', 'p', 'f', 'd', 'j', 'c', 'u', 'h'},
+ {'k', 'l', 's', 'n', 'e', 'i', 'a', 't'},
+ {'b', 'r', 'm', 'y', 'g', 'v', 'o', 'z'},
+ {'c', 'f', 'p', 'x', 'h', 'j', 'u', 'd'},
{'q', '?', '!', 'w', '@', ',', '.', '\''}
};
private static readonly char[,] capitalCharacters = new char[4, 8]
{
- {'K', 'S', 'I', 'N', 'E', 'L', 'A', 'T'},
- {'G', 'B', 'M', 'O', 'Z', 'R', 'Y', 'V'},
- {'X', 'P', 'F', 'D', 'J', 'C', 'U', 'H'},
+ {'K', 'L', 'S', 'N', 'E', 'I', 'A', 'T'},
+ {'B', 'R', 'M', 'Y', 'G', 'V', 'O', 'Z'},
+ {'C', 'F', 'P', 'X', 'H', 'J', 'U', 'D'},
{'Q', '-', '_', 'W', '*', '/', ':', '\"'}
};
@@ -111,11 +111,32 @@ namespace LanguageGenerator
generatedOutput.Append(keyboardActionsString);
}
- using var writer = File.CreateText(fileName);
- writer.Write("" + Environment.NewLine);
- writer.Write(generatedOutput);
- writer.Write(File.ReadAllText("append.xml"));
- writer.Write(Environment.NewLine + "");
+ using (var writer = File.CreateText(fileName))
+ {
+ writer.Write("" + Environment.NewLine);
+ writer.Write(generatedOutput);
+ writer.Write(File.ReadAllText("append.xml"));
+ writer.Write(Environment.NewLine + "");
+ }
+
+ var lowerCaseBuilder = new StringBuilder();
+ var upperCaseBuilder = new StringBuilder();
+ foreach (var column in new int[] { 2, 4, 6, 0 })
+ {
+ for (var i = 0; i < 4; i++)
+ {
+ lowerCaseBuilder.Append(smallCharacters[i, column]);
+ lowerCaseBuilder.Append(smallCharacters[i, column + 1]);
+
+ upperCaseBuilder.Append(capitalCharacters[i, column]);
+ upperCaseBuilder.Append(capitalCharacters[i, column + 1]);
+ }
+ }
+
+ var lowerCaseDisplay = lowerCaseBuilder.ToString();
+ var upperCaseDisplay = upperCaseBuilder.ToString();
+ Console.WriteLine(lowerCaseDisplay);
+ Console.WriteLine(upperCaseDisplay);
}
private static KeyboardAction CharToKeyboardAction(char chr, int circle, int line)
@@ -126,20 +147,7 @@ namespace LanguageGenerator
{
var c when c >= 'a' && c <= 'z' => new KeyboardAction(new KeyCodeContent(c, circle, line), movementActions),
var c when c >= 'A' && c <= 'Z' => new KeyboardAction(new KeyCodeContent(c, circle, line), movementActions, upperCaseFlags),
- /* var c when c == '?' => new KeyboardAction(new StringContent("?"), movementActions),
- var c when c == '!' => new KeyboardAction(new StringContent("!"), movementActions),
- var c when c == '@' => new KeyboardAction(new StringContent("@"), movementActions),
- var c when c == ',' => new KeyboardAction(new StringContent(","), movementActions),
- var c when c == '.' => new KeyboardAction(new StringContent("."), movementActions),
- var c when c == '\'' => new KeyboardAction(new StringContent("\'"), movementActions),
- var c when c == '-' => new KeyboardAction(new StringContent("?"), movementActions),
- var c when c == '_' => new KeyboardAction(new StringContent("!"), movementActions),
- var c when c == '*' => new KeyboardAction(new StringContent("@"), movementActions),
- var c when c == '/' => new KeyboardAction(new StringContent(","), movementActions),
- var c when c == ':' => new KeyboardAction(new StringContent("."), movementActions),
- var c when c == '\"' => new KeyboardAction(new StringContent("\'"), movementActions), */
var c => new KeyboardAction(new StringContent(c.ToString()), movementActions)
- //_ => throw new ArgumentException($"Unknown character: '{chr}' ({(int)chr})")
};
}
@@ -258,7 +266,7 @@ namespace LanguageGenerator
public int Line { get; }
public string GetContent() => $"{KeyCodeText}";
- public string GetActionType() =>"INPUT_KEY";
+ public string GetActionType() => "INPUT_KEY";
}
public class StringContent : IKeyboardContent