mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 03:37:10 +08:00
Removing WinR (#2381)
This commit is contained in:
parent
08a7394c1b
commit
368640b59b
@ -289,21 +289,24 @@ namespace Wox.Plugin.Shell
|
|||||||
|
|
||||||
bool API_GlobalKeyboardEvent(int keyevent, int vkcode, SpecialKeyState state)
|
bool API_GlobalKeyboardEvent(int keyevent, int vkcode, SpecialKeyState state)
|
||||||
{
|
{
|
||||||
if (_settings.ReplaceWinR)
|
// not overriding Win+R
|
||||||
{
|
// crutkas we need to earn the right for Win+R override
|
||||||
if (keyevent == (int)KeyEvent.WM_KEYDOWN && vkcode == (int)Keys.R && state.WinPressed)
|
|
||||||
{
|
//if (_settings.ReplaceWinR)
|
||||||
_winRStroked = true;
|
//{
|
||||||
OnWinRPressed();
|
// if (keyevent == (int)KeyEvent.WM_KEYDOWN && vkcode == (int)Keys.R && state.WinPressed)
|
||||||
return false;
|
// {
|
||||||
}
|
// _winRStroked = true;
|
||||||
if (keyevent == (int)KeyEvent.WM_KEYUP && _winRStroked && vkcode == (int)Keys.LWin)
|
// OnWinRPressed();
|
||||||
{
|
// return false;
|
||||||
_winRStroked = false;
|
// }
|
||||||
_keyboardSimulator.ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.BACK);
|
// if (keyevent == (int)KeyEvent.WM_KEYUP && _winRStroked && vkcode == (int)Keys.LWin)
|
||||||
return false;
|
// {
|
||||||
}
|
// _winRStroked = false;
|
||||||
}
|
// _keyboardSimulator.ModifiedKeyStroke(VirtualKeyCode.LWIN, VirtualKeyCode.BACK);
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,10 @@ namespace Wox.Plugin.Shell
|
|||||||
public class Settings
|
public class Settings
|
||||||
{
|
{
|
||||||
public Shell Shell { get; set; } = Shell.RunCommand;
|
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 LeaveShellOpen { get; set; }
|
||||||
public bool RunAsAdministrator { get; set; } = false;
|
public bool RunAsAdministrator { get; set; } = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user