[documentation] Windows Key Event

Ideas for new features & functions

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 406
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

[documentation] Windows Key Event

Post by Grovkillen » Wed Feb 05, 2020 6:05 pm

I found out that you need to have the extra parameter set to 8 in order for the windows button to trigger an event that you can act on:

Code: Select all

OnEvent>KEY_DOWN,VK91,8,<sub routine>
i.e. this will not trigger:

Code: Select all

OnEvent>KEY_DOWN,VK91,0,<sub routine>
Let>ME=%Script%

Running: MS14.5.4

User avatar
JRL
Automation Wizard
Posts: 3318
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: [documentation] Windows Key Event

Post by JRL » Thu Feb 06, 2020 5:31 am

As is the case with all 5 modifier keys. Using Key_down,VK16 for a shift key press detection does not work if the modifier parameter is anything but 1 which is the shift key modifier parameter. Etc.

Code: Select all

/*
91,92,16,17,18
lwin,rwin,shift,ctrl,alt
*/

OnEvent>key_down,VK16,1,quit
OnEvent>key_down,VK17,2,quit
OnEvent>key_down,VK18,3,quit

Label>Loop
Wait>0.01
GoTo>Loop

SRT>quit
  Exit
END>quit

User avatar
Grovkillen
Automation Wizard
Posts: 406
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: [documentation] Windows Key Event

Post by Grovkillen » Thu Feb 06, 2020 6:38 am

Thanks, good to know (and should be documented) :)
Let>ME=%Script%

Running: MS14.5.4

Post Reply