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 <crutkas@microsoft.com>
This commit is contained in:
Clint Rutkas
2020-07-31 15:16:49 -07:00
committed by GitHub
parent 55b92ab263
commit e03ef0b739
4 changed files with 1 additions and 45 deletions

View File

@@ -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<Settings> _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;
}
}
}

View File

@@ -89,7 +89,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="InputSimulator" Version="1.0.4" />
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Runtime" Version="4.3.1" />

View File

@@ -92,9 +92,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="InputSimulator" Version="1.0.4">
<NoWarn>NU1701</NoWarn>
</PackageReference>
<PackageReference Include="JetBrains.Annotations" Version="2020.1.0" />
<PackageReference Include="Mages" Version="1.6.0">
<NoWarn>NU1701</NoWarn>