public void UpdateStateBytes(Keyboard keyboard) { for (int index = 0; index < KeyNames.Length; index++) Data[index] = (byte)keyboard.GetKeyState((Key)Enum.Parse(KeyType, KeyNames[index])); }