mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Fix Tab Trap in SettingsHotkey Custom Control (#7136)
* basic logic working * Added a literal for ignore flag which cna be shared by all the files * Added a condition that the other modifier keys should not be pressed * Added comments to describe each scenario * sometimes when multiple modified keys were involved the shift+tab key press was also being invoked, so added an additional check in the IsValid function * use variable for vk_tab * remove new line before initializing dwextraInfo * move flag check if the filterKeyboardevent function * use windows.system.virtualkey.shift instead of defining a constant for the shift key code * removed latest settings to use internal settings instead. Removed the validity check while still within the hotkey other than if it's tab or shift+tab * add a function to send input to the system instead of duplicating the send input code * remove VKSHIFT declaration * display all shortcuts/keys except tab and shift+tab * remove header that is no longer needed
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Helpers
|
||||
{
|
||||
internal static class NativeMethods
|
||||
{
|
||||
[DllImport("user32.dll")]
|
||||
internal static extern uint SendInput(uint nInputs, NativeKeyboardHelper.INPUT[] pInputs, int cbSize);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = true)]
|
||||
internal static extern short GetAsyncKeyState(int vKey);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user