public static void Update() { // get current key down if (KB.KeyAvailable) { if (KB.TryReadKey(out currentKey)) { previousKey = currentKey; } } else { currentKey = null; } // check enter if (currentKey.Key == Sys.ConsoleKeyEx.Enter) { ENTER_DOWN = true; } else { ENTER_DOWN = false; } // check control keys CAPS_LOCK = KB.CapsLock; SHIFT_DOWN = KB.ShiftPressed; CONTROL_DOWN = KB.ControlPressed; ALT_DOWN = KB.AltPressed; }
private static void Enqueue(KeyEvent keyEvent) { mQueuedKeys.Enqueue(keyEvent); }