Пример #1
0
        internal bool IsActionReleased(ActionKeyMapping action)
        {
            if (action.Primary != Keys.None)
            {
                if (IsKeyReleased(action.Primary) && (IsKeyTriggered(action.PrimaryMod) || IsKeyPressed(action.PrimaryMod)))
                {
                    return(true);
                }
            }
            if (action.Secondary != Keys.None)
            {
                if (IsKeyReleased(action.Secondary) && (IsKeyTriggered(action.SecondaryMod) || IsKeyPressed(action.SecondaryMod)))
                {
                    return(true);
                }
            }

            return(false);
        }
Пример #2
0
        internal bool IsActionPressed(ActionKeyMapping action)
        {
            if (action.Primary != Keys.None)
            {
                if (IsKeyPressed(action.Primary) && IsKeyPressed(action.PrimaryMod))
                {
                    return(true);
                }
            }
            if (action.Secondary != Keys.None)
            {
                if (IsKeyPressed(action.Secondary) && IsKeyPressed(action.SecondaryMod))
                {
                    return(true);
                }
            }

            return(false);
        }