Ejemplo n.º 1
0
        public void OnKeyUp(Key key)
        {
            HoldableKey holdableKey = HoldableKeys.Find(holdableKey => holdableKey.Key == key);

            if (holdableKey != null)
            {
                holdableKey.IsBeingHeld = false;
            }
        }
Ejemplo n.º 2
0
        public void OnKeyDown(Key key)
        {
            PressableKeys.Find(pressableKey => pressableKey.Key == key)?.OnPress();
            HoldableKey holdableKey = HoldableKeys.Find(holdableKey => holdableKey.Key == key);

            if (holdableKey != null)
            {
                holdableKey.IsBeingHeld = true;
            }
        }