public static void Clear(ref KeyboardInput input) { input.Held.Clear(); input.Pressed.Clear(); input.Released.Clear(); input.Shift = false; input.Alt = false; input.Ctrl = false; }
internal Keyboard(DKeyboard keyboard) { System.Diagnostics.Debug.Assert(keyboard != null); _dKeyboard = keyboard; _inputState = KeyboardInput.CreateEmpty(); _lastPressedKeys = new List<Key>(); (_timer = new GameTimer()).Start(); _currentDirectInputState = new KeyboardState(); }
public static KeyboardInput CreateEmpty() { var keys = new KeyboardInput(); keys.Held = new List<Key>(); keys.Pressed = new List<Key>(); keys.Released = new List<Key>(); keys.Shift = false; keys.Alt = false; keys.Ctrl = false; return keys; }