Ejemplo n.º 1
0
 private void ShortCutHandler(KeyboardHookEventArgs e)
 {
     if (e.Key == Keys.F1 && e.isAltPressed)
     {
         trayTrayIcon_DoubleClick(null, null);
     }
 }
Ejemplo n.º 2
0
 void GlobalKeyDown(KeyboardHookEventArgs e)
 {
     KeyCombo pressedKeys = KeyCombo.FromKeyboardHookEventArgs(e);
     if (pressedKeys.Equals(keyComboSettings.ToKeyCombo()))
         startCapture();
 }
Ejemplo n.º 3
0
        private static void KeyUp(KeyboardHookEventArgs e)
        {
            //Trace.WriteLine(e.ToString(), "Program.KeyUp");

            if (Configuration.IgnoreAllKeyHooks)
                return;

            //if (e.Key == Keys.RControlKey && isTakingScrollingScreenshot)
            //{
            //    //Trace.WriteLine("isTakingScrollingScreenshot: " + isTakingScrollingScreenshot);
            //    SpawnActionChain(ActiveShortcutProfile.Shortcuts.LastOrDefault());
            //}
        }
Ejemplo n.º 4
0
        private static void KeyDown(KeyboardHookEventArgs e)
        {
            //Trace.WriteLine(e.ToString(), "Program.KeyDown");

            //Trace.WriteLine("Shortcut match: " + CurrentShortcutItem.ToString(), "Program.KeyDown");
            //Trace.WriteLine("isTakingScrollingScreenshot: " + isTakingScrollingScreenshot, "Program.KeyDown");

            var Shortcut = Configuration.Shortcuts.FirstOrDefault(S => S.Enabled && S.KeyCombo.Key == e.Key && S.KeyCombo.isAltPressed == e.isAltPressed && S.KeyCombo.isCtrlPressed == e.isCtrlPressed && S.KeyCombo.isShiftPressed == e.isShiftPressed && S.KeyCombo.isWinPressed == e.isWinPressed);

            if (Configuration.IgnoreAllKeyHooks || Shortcut == null || Shortcut.RequirePreviewOpen && !Preview.Focused)
                return;

            SpawnActionChain(Shortcut);
        }
Ejemplo n.º 5
0
 private void MediaKeyDown(KeyboardHookEventArgs e)
 {
     switch (e.Key)
     {
         case System.Windows.Forms.Keys.MediaPreviousTrack:
             prevButton_Click(null, new EventArgs());
             break;
         case System.Windows.Forms.Keys.MediaPlayPause:
             playPauseButton_Click(null, new EventArgs());
             break;
         case System.Windows.Forms.Keys.MediaNextTrack:
             nextButton_Click(null, new EventArgs());
             break;
     }
 }
Ejemplo n.º 6
0
 public static KeyCombo FromKeyboardHookEventArgs(KeyboardHookEventArgs e)
 {
     return new KeyCombo(e.Key == Keys.LMenu || e.Key == Keys.RMenu || e.Key == Keys.LControlKey || e.Key == Keys.RControlKey || e.Key == Keys.LShiftKey || e.Key == Keys.RShiftKey || e.Key == Keys.LWin || e.Key == Keys.RWin ? Keys.None : e.Key, e.isAltPressed, e.isCtrlPressed, e.isShiftPressed, e.isWinPressed);
 }