Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SendKeysToWindow virtual-key code combination
#1
I want to send CTRL+ALT+F1 to an window using "SendKeysToWindow".
I have the following information to my disposal:

Code:
Copy      Help
Ctrl+Alt+F1
hotkey: vk=112, mod=6
t_hk: 1648

Can I use the above information to send the CTRL+ALT+F1 to an application using:
SendKeysToWindow w key(...)

I tried virtual-key code combination
VK_CONTROL|VK_MENU|VK_F1

and

Code:
Copy      Help
int mod=6
int vk=112
int t_hk=mod<<8|vk
SendKeysToWindow w key(t_hk)

But both methods do not work.

I need to have the hotkey combination stored in ini file wich works with an compiled QM exe.
That's why I hoped to use one or more of the below bold parts (the bold parts are stored in the ini file):
Ctrl+Alt+F1
hotkey: vk=112, mod=6
t_hk: 1648

I read in the helpfile:
IDP_KEY.html
IDP_VIRTUALKEYS.html
#2
try
key((VK_CONTROL)(VK_MENU)(VK_F1))
#3
Yes thank you!
This works!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)