I'm using Autohotkey 1.0.48.5 .

I can use the following code to simulate a right click by Ctrl+0 , tried an worked fine.

^0:: 
SendInput {Click,Right}
return

However, I hope I can use Ctrl+ScrollLock to do the same, but the following code does not work.

^ScrollLock:: 
SendInput {Click,Right}
return

Can someone help me out. thank you.

link|improve this question

feedback

2 Answers

Try with

Ctrl & ScrollLock::
SendInput {Click,Right}
return
link|improve this answer
Was going to also suggest the ampersand. – surfasb Sep 11 '11 at 2:30
Sorry, It does not work. But if I replace 'ScrollLock' with '0' , Ctrl+0 will work -- even with latest Autohotkey 1.1.03.00 . – Jimm Chen Sep 11 '11 at 2:44
1  
Indeed, and it seems to work with ^CapsLock. Interesting... – imiric Sep 11 '11 at 3:08
feedback
up vote 1 down vote accepted

Autohotkey forum helped me out. Using scancode(0x46) instead of 'ScrollLock' does the trick.

So I have to write:

^SC046:: 
SendInput {Click,Right}
return

http://www.autohotkey.com/forum/viewtopic.php?p=473945

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.