private void HandleInputManagerCreated(InputButtons sender, InputButtonManager input) { if (input.Which.Type == InputButtonType.Keyboard) { // Track all created keyboard events... _keys[_keyCount] = input; _keyCount++; } }
private void HandleInputChanged(InputButtonManager sender, InputButtonArgs args) { this.OnButtonStateChanged?.Invoke(sender, args); this.OnButtonState[args.State]?.Invoke(sender, args); }
private void UpdateKey(InputButtonManager key, ref KeyboardState kState) => key.TrySetState(kState.IsKeyDown(key.Which.KeyboardKey) ? ButtonState.Pressed : ButtonState.Released);