OpenTK.Input.KeyboardDevice.SetKey C# (CSharp) Method

SetKey() private method

private SetKey ( Key key, uint scancode, bool state ) : void
key Key
scancode uint
state bool
return void
        internal void SetKey(Key key, uint scancode, bool state)
        {
            if (keys[(int)key] != state || KeyRepeat)
            {
                keys[(int)key] = scancodes[scancode] = state;

                if (state && KeyDown != null)
                {
                    args.Key = key;
                    args.ScanCode = scancode;
                    KeyDown(this, args);
                }
                else if (!state && KeyUp != null)
                {
                    args.Key = key;
                    args.ScanCode = scancode;
                    KeyUp(this, args);
                }
            }
        }