public string GetKeyPressForLoggingPurposes(SwitchPanelKey switchPanelKey) { var result = ""; foreach (var keyBinding in _keyBindings) { if (keyBinding.OSKeyPress != null && keyBinding.SwitchPanelPZ55Key == switchPanelKey.SwitchPanelPZ55Key && keyBinding.WhenTurnedOn == switchPanelKey.IsOn) { result = keyBinding.OSKeyPress.GetNonFunctioningVirtualKeyCodesAsString(); } } return(result); }
private void PZ55SwitchChanged(SwitchPanelKey switchPanelKey) { if (!ForwardKeyPresses) { return; } foreach (var keyBinding in _keyBindings) { if (keyBinding.SwitchPanelPZ55Key == switchPanelKey.SwitchPanelPZ55Key && keyBinding.WhenTurnedOn == switchPanelKey.IsOn) { keyBinding.OSKeyPress.Execute(); } } }
private void CreateSwitchKeys() { _switchPanelKeys = SwitchPanelKey.GetPanelSwitchKeys(); }
private static bool FlagValue(byte[] currentValue, SwitchPanelKey switchPanelKey) { return((currentValue[switchPanelKey.Group] & switchPanelKey.Mask) > 0); }