gmamaladze / globalmousekeyhook

This library allows you to tap keyboard and mouse, detect and record their activity even when an application is inactive and runs in background.
MIT License
1.04k stars 257 forks source link

Combination Equal problem #183

Open wojiuxuihuan opened 1 year ago

wojiuxuihuan commented 1 year ago

The origon code as following, which will always get the wrong answer:

        protected bool Equals(Combination other)
        {
            return TriggerKey == other.TriggerKey && Chord.Equals(other.Chord);
        }

Add a pair of parentheses should fix:

        protected bool Equals(Combination other)
        {
            return (TriggerKey == other.TriggerKey) && Chord.Equals(other.Chord);
        }