CTRL-SPACE as a hotkey for a script

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
drstuggi
Newbie
Posts: 9
Joined: Sun Feb 14, 2021 8:53 pm

CTRL-SPACE as a hotkey for a script

Post by drstuggi » Sun Aug 13, 2023 1:21 pm

How do I assign this? I am having trouble with making the OnEvent function work, so that seems dead end.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1354
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: CTRL-SPACE as a hotkey for a script

Post by Dorian (MJT support) » Sun Aug 13, 2023 3:07 pm

CTRL-SPACE is not an option for a hotkey. If you're looking to detect it as an Onevent, the code below will do that :

Code: Select all

OnEvent>KEY_DOWN,VK32,2,KeyPress

//keep the script running
label>loop
wait>0.1
goto>loop


SRT>KeyPress
  MDL>CTRL+Space was pressed
END>KeyPress
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts