From 368640b59b5047b9b5100e8a7b421159578649e5 Mon Sep 17 00:00:00 2001 From: Clint Rutkas Date: Fri, 24 Apr 2020 11:10:40 -0700 Subject: [PATCH] Removing WinR (#2381) --- .../launcher/Plugins/Wox.Plugin.Shell/Main.cs | 33 ++++++++++--------- .../Plugins/Wox.Plugin.Shell/Settings.cs | 5 ++- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/modules/launcher/Plugins/Wox.Plugin.Shell/Main.cs b/src/modules/launcher/Plugins/Wox.Plugin.Shell/Main.cs index 817426e8f9..152ca8b7c0 100644 --- a/src/modules/launcher/Plugins/Wox.Plugin.Shell/Main.cs +++ b/src/modules/launcher/Plugins/Wox.Plugin.Shell/Main.cs @@ -289,21 +289,24 @@ namespace Wox.Plugin.Shell bool API_GlobalKeyboardEvent(int keyevent, int vkcode, SpecialKeyState state) { - 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; - } - } + // 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; } diff --git a/src/modules/launcher/Plugins/Wox.Plugin.Shell/Settings.cs b/src/modules/launcher/Plugins/Wox.Plugin.Shell/Settings.cs index 616f28cad5..e4e1cd43fc 100644 --- a/src/modules/launcher/Plugins/Wox.Plugin.Shell/Settings.cs +++ b/src/modules/launcher/Plugins/Wox.Plugin.Shell/Settings.cs @@ -5,7 +5,10 @@ namespace Wox.Plugin.Shell public class Settings { public Shell Shell { get; set; } = Shell.RunCommand; - public bool ReplaceWinR { get; set; } = true; + + // not overriding Win+R + // crutkas we need to earn the right for Win+R override + public bool ReplaceWinR { get; set; } = false; public bool LeaveShellOpen { get; set; } public bool RunAsAdministrator { get; set; } = false;