Skip to content

Commit

Permalink
Merge pull request #2903 from Guillermo-Santos/console
Browse files Browse the repository at this point in the history
Solve #2894
  • Loading branch information
zarlo authored Jan 17, 2024
2 parents 464a9d4 + c511786 commit bfd8856
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/Cosmos.System2/IO/StdInReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public bool ReadLineCore(bool consumeKeys)
{
readLineSB.Append(current.KeyChar);

Global.Console.Write(encoding.GetBytes(new char[1] { current.KeyChar })[0]);
Global.Console.Write(encoding.GetBytes(new char[] { current.KeyChar }));
Global.Console.UpdateCursorFromCache();
currentCount++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected override void InitKeys()
Keys.Add(new KeyMapping(0x0C, 'ß', '?', 'ß', 'ß', '?', 'ß', '\\', ConsoleKeyEx.Minus));
Keys.Add(new KeyMapping(0x0D, '´', '`', '´', '´', '`', '´', ConsoleKeyEx.Equal));
Keys.Add(new KeyMapping(0x0E, ConsoleKeyEx.Backspace));
Keys.Add(new KeyMapping(0x0F, ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x0F, '\t', ConsoleKeyEx.Tab));
/* qwertzuiopü+ QWERTZUIOPÜ* @_€________~ */
Keys.Add(new KeyMapping(0x10, 'q', 'Q', 'q', 'Q', 'q', 'Q', '@', ConsoleKeyEx.Q));
Keys.Add(new KeyMapping(0x11, 'w', 'W', 'w', 'W', 'w', 'W', ConsoleKeyEx.W));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected override void InitKeys()
Keys.Add(new KeyMapping(0x0C, '\'', '?', '\'', '-', '?', '?', ConsoleKeyEx.Minus));
Keys.Add(new KeyMapping(0x0D, '¡', '¿', '¡', '¡', '¿', '¿', ConsoleKeyEx.Equal));
Keys.Add(new KeyMapping(0x0E, ConsoleKeyEx.Backspace));
Keys.Add(new KeyMapping(0x0F, ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x0F, '\t', ConsoleKeyEx.Tab));
/* QWERTYUIOP[] */
Keys.Add(new KeyMapping(0x10, 'q', 'Q', 'q', 'Q', 'q', 'Q', ConsoleKeyEx.Q));
Keys.Add(new KeyMapping(0x11, 'w', 'W', 'w', 'W', 'w', 'W', ConsoleKeyEx.W));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override void InitKeys()
Keys.Add(new KeyMapping(0x0C, ')', '°', ')', '°', ')', '°', ConsoleKeyEx.Minus));
Keys.Add(new KeyMapping(0x0D, '=', '+', '=', '+', '=', '+', ConsoleKeyEx.Equal));
Keys.Add(new KeyMapping(0x0E, ConsoleKeyEx.Backspace));
Keys.Add(new KeyMapping(0x0F, ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x0F, '\t', ConsoleKeyEx.Tab));
/* QWERTYUIOP[] */
Keys.Add(new KeyMapping(0x10, 'a', 'A', 'a', 'A', 'a', 'A', ConsoleKeyEx.A));
Keys.Add(new KeyMapping(0x11, 'z', 'Z', 'z', 'Z', 'z', 'Z', ConsoleKeyEx.Z));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected override void InitKeys()
Keys.Add(new KeyMapping(0x0C, '-', '_', '-', '-', '_', '-', ConsoleKeyEx.Minus));
Keys.Add(new KeyMapping(0x0D, '=', '+', '=', '=', '+', '=', ConsoleKeyEx.Equal));
Keys.Add(new KeyMapping(0x0E, ConsoleKeyEx.Backspace));
Keys.Add(new KeyMapping(0x0F, ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x0F, '\t', ConsoleKeyEx.Tab));
/* QWERTYUIOP[] */
Keys.Add(new KeyMapping(0x10, 'q', 'Q', 'q', 'Q', 'q', 'Q', ConsoleKeyEx.Q));
Keys.Add(new KeyMapping(0x11, 'w', 'W', 'w', 'W', 'w', 'W', ConsoleKeyEx.W));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected override void InitKeys()
Keys.Add(new KeyMapping(0x0C, '*', '?', '*', '*', '?', '*', ConsoleKeyEx.NoName));
Keys.Add(new KeyMapping(0x0D, '-', '_', '-', '-', '_', '-', ConsoleKeyEx.Minus));
Keys.Add(new KeyMapping(0x0E, ConsoleKeyEx.Backspace));
Keys.Add(new KeyMapping(0x0F, ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x0F, '\t', ConsoleKeyEx.Tab));
/* QWERTYUIOP[] */
Keys.Add(new KeyMapping(0x10, 'q', 'Q', 'q', 'Q', 'q', 'Q', ConsoleKeyEx.Q));
Keys.Add(new KeyMapping(0x11, 'w', 'W', 'w', 'W', 'w', 'W', ConsoleKeyEx.W));
Expand Down
2 changes: 1 addition & 1 deletion source/Cosmos.System2/Keyboard/ScanMaps/USDvorakLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected override void InitKeys()
//Keys.Add(new KeyMapping(0x0C, '-', '_', '-', '-', '_', '-', ConsoleKeyEx.Minus));
//Keys.Add(new KeyMapping(0x0D, '=', '+', '=', '=', '+', '=', ConsoleKeyEx.Equal));
Keys.Add(new KeyMapping(0x0E, ConsoleKeyEx.Backspace));
Keys.Add(new KeyMapping(0x0F, ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x0F, '\t', ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x10, '\'', '"', '\'', '\'', '"', '"', ConsoleKeyEx.Apostrophe)); //'q', 'Q', 'q', 'Q', 'q', 'Q', ConsoleKeyEx.Q));
Keys.Add(new KeyMapping(0x11, ',', '<', ',', ',', '<', '<', ConsoleKeyEx.Comma)); //'w', 'W', 'w', 'W', 'w', 'W', ConsoleKeyEx.W));
Keys.Add(new KeyMapping(0x12, '.', '>', '.', '.', '>', '>', ConsoleKeyEx.Period)); //'e', 'E', 'e', 'E', 'e', 'E', ConsoleKeyEx.E));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected override void InitKeys()
Keys.Add(new KeyMapping(0x0C, '-', '_', '-', '-', '_', '-', ConsoleKeyEx.Minus));
Keys.Add(new KeyMapping(0x0D, '=', '+', '=', '=', '+', '=', ConsoleKeyEx.Equal));
Keys.Add(new KeyMapping(0x0E, ConsoleKeyEx.Backspace));
Keys.Add(new KeyMapping(0x0F, ConsoleKeyEx.Tab));
Keys.Add(new KeyMapping(0x0F, '\t', ConsoleKeyEx.Tab));
/* QWERTYUIOP[] */
Keys.Add(new KeyMapping(0x10, 'q', 'Q', 'q', 'Q', 'q', 'Q', ConsoleKeyEx.Q));
Keys.Add(new KeyMapping(0x11, 'w', 'W', 'w', 'W', 'w', 'W', ConsoleKeyEx.W));
Expand Down

0 comments on commit bfd8856

Please sign in to comment.