From e03ef0b7390ebc1878269f6bcef38588c78b4a9a Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Fri, 31 Jul 2020 15:16:49 -0700 Subject: [PATCH] Remove InputSimulator nuget package (#5388) * getting app to not use it, now installer * removed windowinput.dll from inputsimulator nuget package Co-authored-by: Clint Rutkas --- installer/PowerToysSetup/Product.wxs | 2 +- .../Plugins/Microsoft.Plugin.Shell/Main.cs | 40 ------------------- .../Microsoft.Plugin.Shell.csproj | 1 - .../PowerLauncher/PowerLauncher.csproj | 3 -- 4 files changed, 1 insertion(+), 45 deletions(-) diff --git a/installer/PowerToysSetup/Product.wxs b/installer/PowerToysSetup/Product.wxs index 4f25664b05..60ae35fb10 100644 --- a/installer/PowerToysSetup/Product.wxs +++ b/installer/PowerToysSetup/Product.wxs @@ -838,7 +838,7 @@ - + diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Main.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Main.cs index ad51f02461..2ffd30c18a 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Main.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Main.cs @@ -1,22 +1,15 @@ using Microsoft.PowerToys.Settings.UI.Lib; - using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; -using System.Threading.Tasks; -using System.Windows; -using WindowsInput; -using WindowsInput.Native; using Wox.Infrastructure.Logger; using Wox.Infrastructure.Storage; using Wox.Plugin.SharedCommands; using Wox.Plugin; -using Application = System.Windows.Application; using Control = System.Windows.Controls.Control; -using Keys = System.Windows.Forms.Keys; using System.Windows.Input; using System.Reflection; @@ -26,8 +19,6 @@ namespace Microsoft.Plugin.Shell { private string IconPath { get; set; } private PluginInitContext _context; - private bool _winRStroked; - private readonly KeyboardSimulator _keyboardSimulator = new KeyboardSimulator(new InputSimulator()); private readonly Settings _settings; private readonly PluginJsonStorage _storage; @@ -310,36 +301,6 @@ namespace Microsoft.Plugin.Shell UpdateIconPath(newTheme); } - bool API_GlobalKeyboardEvent(int keyevent, int vkcode, SpecialKeyState state) - { - // not overriding Win+R - // crutkas we need to earn the right for Win+R override - /* - if (_settings.ReplaceWinR) - { - if (keyevent == (int)KeyEvent.WM_KEYDOWN && vkcode == (int)Keys.R && state.WinPressed) - { - _winRStroked = true; - OnWinRPressed(); - return false; - } - if (keyevent == (int)KeyEvent.WM_KEYUP && _winRStroked && vkcode == (int)Keys.LWin) - { - _winRStroked = false; - _keyboardSimulator.ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.BACK); - return false; - } - } - */ - return true; - } - - private void OnWinRPressed() - { - _context.API.ChangeQuery($"{_context.CurrentPluginMetadata.ActionKeywords[0]}{Wox.Plugin.Query.TermSeparator}"); - Application.Current.MainWindow.Visibility = Visibility.Visible; - } - public Control CreateSettingPanel() { return new CMDSetting(_settings); @@ -380,7 +341,6 @@ namespace Microsoft.Plugin.Shell public void UpdateSettings(PowerLauncherSettings settings) { - //_settings.ReplaceWinR = settings.properties.override_win_r_key; } } } diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj index acba15813a..f9be8bf1bd 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Shell/Microsoft.Plugin.Shell.csproj @@ -89,7 +89,6 @@ - diff --git a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj index cd2fd7a656..e422a56808 100644 --- a/src/modules/launcher/PowerLauncher/PowerLauncher.csproj +++ b/src/modules/launcher/PowerLauncher/PowerLauncher.csproj @@ -92,9 +92,6 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - NU1701 - NU1701