Added some new Console keys.

This commit is contained in:
MichaelTheShifter 2016-06-18 15:26:01 -04:00
parent 05c8cb273e
commit db31f1bbfe
2 changed files with 31 additions and 1 deletions

View file

@ -140,6 +140,37 @@ namespace Cosmos.HAL
return ConsoleKey.RightArrow;
case ConsoleKeyEx.Sleep:
return ConsoleKey.Sleep;
case ConsoleKeyEx.BiggerThan:
case ConsoleKeyEx.Period:
return ConsoleKey.OemPeriod;
case ConsoleKeyEx.LowerThan:
case ConsoleKeyEx.Comma:
return ConsoleKey.OemComma;
case ConsoleKeyEx.NumPeriod:
return ConsoleKey.Decimal;
case ConsoleKeyEx.NumPlus:
return ConsoleKey.Add;
case ConsoleKeyEx.NumEnter:
return ConsoleKey.Enter;
case ConsoleKeyEx.Backslash:
return ConsoleKey.Oem5;
case ConsoleKeyEx.LBracket:
return ConsoleKey.Oem4;
case ConsoleKeyEx.RBracket:
return ConsoleKey.Oem6;
case ConsoleKeyEx.Minus:
return ConsoleKey.OemMinus;
case ConsoleKeyEx.Apostrophe:
return ConsoleKey.Oem7;
case ConsoleKeyEx.Slash:
return ConsoleKey.Oem2;
case ConsoleKeyEx.Equal:
return ConsoleKey.OemPlus;
case ConsoleKeyEx.Backquote:
return ConsoleKey.Oem3;
case ConsoleKeyEx.Semicolon:
case ConsoleKeyEx.Colon:
return ConsoleKey.Oem1;
default:
throw new Exception("KeyEx not implemented!");
}

View file

@ -382,7 +382,6 @@ namespace Cosmos.System.Plugs.System
public static ConsoleKeyInfo ReadKey(Boolean intercept)
{
var key = Cosmos.HAL.Global.Keyboard.ReadKey();
if (false == intercept && key.KeyChar != '\0')
{
Write(key.KeyChar);