C# - Detecting if the SHIFT key is held when opening a context menu
问题 In my C# application I want to display a context menu, but I want to add special options to the menu if the SHIFT key is being held down when the context menu is opened. I'm currently using the GetKeyState API to check for the SHIFT key. It works fine on my computer but users with non-English Windows say it doesn't work at all for them. I also read that in the Win32 API when a context menu is opened there's a flag that indicates in the menu should show EXTENDEDVERBS . In C# the EventArgs for