Can't send Ctrl+WheelUp or Ctrl+WheelDown from a keyboard key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mmmax
Posts: 81
Joined: 25 Jun 2018, 09:01

Can't send Ctrl+WheelUp or Ctrl+WheelDown from a keyboard key

Post by mmmax » 29 Apr 2022, 04:34

I've tried every way I could think of, some from the AHK help file, and some I found on here to simulate holding Ctrl and scrolling the mousewheel up or down via a keystroke. All attempts have thus far been unsuccessful, and I'm at my wits end.

An application I use has certain actions that will only accept mousewheel scrolling (with modifier keys held) as the binding to trigger them. I want to be able to achieve the same result as holding Ctrl and scrolling mousewheel up or down by pressing PgUp and PgDn so I'm not limited to needing to use the mousewheel for certain actions. Is there some way to actually get this to work? So far, the best I've been able to do is getting a single mousewheel click through without the Ctrl modifier held down.

Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can't send Ctrl+WheelUp or Ctrl+WheelDown from a keyboard key

Post by Rohwedder » 29 Apr 2022, 05:14

Hallo,
have you tried it as admin?

mmmax
Posts: 81
Joined: 25 Jun 2018, 09:01

Re: Can't send Ctrl+WheelUp or Ctrl+WheelDown from a keyboard key

Post by mmmax » 25 May 2022, 23:11

How does this work exactly? I have the AHK app set to run as administrator. I'm still not sure what script will work properly to execute this.

I am trying to get it to work for both windows 10 and 11 since I have two machines I use for working on projects for different clients, and would like to be able to use the same AHK script on both machines.

Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Can't send Ctrl+WheelUp or Ctrl+WheelDown from a keyboard key

Post by Rohwedder » 26 May 2022, 00:57

You have the choice which rights this script should get:

Code: Select all

#SingleInstance, Force
If !A_IsAdmin
	Try Run *RunAs "%A_ScriptFullPath%"
MsgBox,,,% "I'm " (A_IsAdmin?"admin 😈":"only user 😇"), 3
*Esc::ExitApp

mmmax
Posts: 81
Joined: 25 Jun 2018, 09:01

Re: Can't send Ctrl+WheelUp or Ctrl+WheelDown from a keyboard key

Post by mmmax » 26 May 2022, 07:36

So yes, my AHK script is also being run with admin rights. Still can't seem to figure out how to send wheelUp or WheelDown with Ctrl modifier. And after trying a few ways I found in the help file, the best I can seem to do is send the mousewheel scrolling one line up or down (unless I use a repeat/loop) with no modifier keys down.

Post Reply

Return to “Ask for Help (v1)”