public string GetKeyPressForLoggingPurposes(TPMPanelSwitch tpmPanelSwitch) { var result = ""; foreach (var keyBinding in _keyBindings) { if (keyBinding.OSKeyPress != null && keyBinding.TPMSwitch == tpmPanelSwitch.TPMSwitch && keyBinding.WhenTurnedOn == tpmPanelSwitch.IsOn) { result = keyBinding.OSKeyPress.GetNonFunctioningVirtualKeyCodesAsString(); } } return(result); }
private void TPMSwitchChanged(TPMPanelSwitch tpmPanelSwitch) { if (!ForwardKeyPresses) { return; } foreach (var keyBinding in _keyBindings) { if (keyBinding.TPMSwitch == tpmPanelSwitch.TPMSwitch && keyBinding.WhenTurnedOn == tpmPanelSwitch.IsOn) { keyBinding.OSKeyPress.Execute(); } } }
private void CreateSwitchKeys() { _tpmPanelSwitches = TPMPanelSwitch.GetTPMPanelSwitches(); }
private static bool FlagValue(byte[] currentValue, TPMPanelSwitch tpmPanelSwitch) { return((currentValue[tpmPanelSwitch.Group] & tpmPanelSwitch.Mask) > 0); }