private void ListenForKeyChanges() { if (!isInitialized) { Initialize(); } foreach (EKutiButton button in EKutiButton.GetValues(typeof(EKutiButton))) { bool input = false; try { input = ReadStream(fileStreams[button]) == 48; } catch { } if (input != currentInputs[button]) { currentInputs[button] = input; if (input == true) { currentButtonDown[button] = true; } else if (input == false) { currentButtonUp[button] = true; } } } }
private void ResetUpDownDictionarys() { foreach (EKutiButton button in EKutiButton.GetValues(typeof(EKutiButton))) { currentButtonDown[button] = false; currentButtonUp[button] = false; } }