Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Ctrl+ScrollLock to send mouse rightclick, but failed, why?


  • Please log in to reply
6 replies to this topic
chjfth
  • Members
  • 10 posts
  • Last active: Sep 12 2011 12:58 AM
  • Joined: 03 Jan 2010
^ScrollLock:: 
SendInput {Click,Right}
return

I hope this can do that, but failed mysteriously. Hope Autohotkey gurus here can tell me why.

However I've tried Ctrl+0 and Ctrl+CapsLock which both work, as described in http://superuser.com/q/334246/74107


Autohotkey 1.1.03.00

  • Guests
  • Last active:
  • Joined: --
I guess ( i am no guru) Ctrl + ScrollLock on a hardware level is the same as Ctrl + Break some leftover from old days

spg SCOTT
  • Members
  • 115 posts
  • Last active: Apr 20 2012 04:41 PM
  • Joined: 10 Jun 2011
I have similar troubles with the scroll lock key. Specifying it by name does not work, I have to use the scan code.

I also found that the scroll lock key has the same scan code on two different machines. (SC046)

Try replacing ScrollLock with the scan code.

For example, the scan code is used like this:

^SC046:: ;046 is the key for Scroll Lock on my machine, where scroll lock key doesn't work when called by name.
;code here
return

Take a look at the special keys section on how to find the scan code:
<!-- m -->http://www.autohotke...ocs/KeyList.htm<!-- m -->
“There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!” Richard Feynman

chjfth
  • Members
  • 10 posts
  • Last active: Sep 12 2011 12:58 AM
  • Joined: 03 Jan 2010
You're dead right, SCOTT. My problem is solved.

I use KeyView2.exe in Charles Petzold Programming Windows 5th-ed to find out ScrollLock's scan code is 0x46, indeed.

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
there are tools in AHK to figure out scan codes as well. See KeyHistory

spg SCOTT
  • Members
  • 115 posts
  • Last active: Apr 20 2012 04:41 PM
  • Joined: 10 Jun 2011
There was also a script posted here somewhere that would fill the clipboard with the scan code of the pressed key with a Gui...

EDIT: Found it.
<!-- m -->http://www.autohotke... ... t=scancode<!-- m -->
“There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!” Richard Feynman

  • Guests
  • Last active:
  • Joined: --
<!-- m -->http://www.autohotke...991.html#145991<!-- m -->