Example #1
0
 void HandleShiftKeyPressed(ModifierKeyBase shiftKey)
 {
     _allLogicalKeys.OfType<CaseSensitiveKey>().ToList().ForEach(x => x.SelectedIndex =
                                                                      InputSimulator.IsTogglingKeyInEffect(VirtualKeyCode.CAPITAL) ^ shiftKey.IsInEffect ? 1 : 0);
     _allLogicalKeys.OfType<ShiftSensitiveKey>().ToList().ForEach(x => x.SelectedIndex = shiftKey.IsInEffect ? 1 : 0);
 }
Example #2
0
 void HandleCapsLockKeyPressed(ModifierKeyBase capsLockKey)
 {
     _allLogicalKeys.OfType<CaseSensitiveKey>().ToList().ForEach(x => x.SelectedIndex =
                                                                      capsLockKey.IsInEffect ^ InputSimulator.IsKeyDownAsync(VirtualKeyCode.SHIFT) ? 1 : 0);
 }
Example #3
0
 void HandleNumLockKeyPressed(ModifierKeyBase numLockKey)
 {
     _allLogicalKeys.OfType<NumLockSensitiveKey>().ToList().ForEach(x => x.SelectedIndex = numLockKey.IsInEffect ? 1 : 0);
 }
Example #4
0
        private void HandleControlKeyPressed(ModifierKeyBase controlKey)
        {
            bool isShiftdown = InputSimulator.IsKeyDown(VirtualKeyCode.SHIFT);
            int selectedIndex = 0;
            if (isShiftdown)
                selectedIndex = controlKey.IsInEffect ? 2 : 1;

            _allLogicalKeys.OfType<CtrlAltShiftSensitiveKey>().ToList().ForEach(x => x.SelectedIndex = selectedIndex);
        }