Application.onkey windows key

topi1

Board Regular
Joined
Aug 6, 2014
Messages
161
Office Version
  1. 2010
Am I correct in assuming that there is no syntax for the windows key with application.onkey? Like there is ^ for Ctrl and + for Shft. I am trying to send "Ctrl+Windows+4". I know Ctrl+Esc works as windows key but since Iam already using Ctrl in the combination, that is not an option. Is there a way to circumvent this by creating separate application.onkey which will fire Windows and then the next step to use that to trigger Ctrl+Win+4.

All this so I can use excel to activate the program in the taskbar #4 location and copy its data. Thank you.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Windows key is not in the list of keys that can trigger key events.
Is there a way to circumvent this by creating separate application.onkey which will fire Windows
I don't know what "fire Windows" means.

My guess is that you'd need to find a Windows API for this, assuming it exists, or just click to make a window active and then run whatever procedure you have.
 
Upvote 0
As pointed out by Micron, in order to intercept the Win key, you will need to use the Win32. This is not easy. It can be done using a keyboard hook or for a more stable workaround, via subclassing a message only window and using the system Raw Input feature.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top