Migrate files from Wox to PowerLauncher (#5014)

* Moved all files from Wox to Powerlauncher

* Removed Wox project

* Changed namespace for imported files

* Resolved errors for VM

* Added build dependency order

* Fixed errors in helper class

* Remove Wox files

* Fixed errors in SingleInstance class

* Fixed wox.tests

* Fixed MSI

* Removed obsolete methods from PublicAPI

* nit fixes

* Throw null exception

* Fix merge conflict
This commit is contained in:
Divyansh Srivastava
2020-07-20 11:22:03 -07:00
committed by GitHub
parent 177546bab6
commit c85cd4ac24
40 changed files with 587 additions and 1048 deletions

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using Wox.Plugin;
namespace PowerLauncher.Helper
{
class KeyboardHelper
{
public static SpecialKeyState CheckModifiers()
{
SpecialKeyState state = new SpecialKeyState();
if ((Keyboard.GetKeyStates(Key.LeftShift) & KeyStates.Down) > 0 ||
(Keyboard.GetKeyStates(Key.RightShift) & KeyStates.Down) > 0)
{
state.ShiftPressed = true;
}
if ((Keyboard.GetKeyStates(Key.LWin) & KeyStates.Down) > 0 ||
(Keyboard.GetKeyStates(Key.RWin) & KeyStates.Down) > 0)
{
state.WinPressed = true;
}
if ((Keyboard.GetKeyStates(Key.LeftCtrl) & KeyStates.Down) > 0 ||
(Keyboard.GetKeyStates(Key.RightCtrl) & KeyStates.Down) > 0)
{
state.CtrlPressed = true;
}
if ((Keyboard.GetKeyStates(Key.LeftAlt) & KeyStates.Down) > 0 ||
(Keyboard.GetKeyStates(Key.RightAlt) & KeyStates.Down) > 0)
{
state.AltPressed = true;
}
return state;
}
}
}