Hey everyone,
I hope you're doing well. I'm currently trying to bind the Ctrl + Shift combination to my Numpad2 key using AutoHotkey, but I'm facing some issues. I've written the following code:
Numpad2::Send ^+
However, it doesn't seem to work as expected. When I press the Numpad2 key, nothing happens. I'm wondering if I'm missing something in the code or if there's a different approach to achieving this key binding.
Has anyone successfully bound Ctrl + Shift to a specific key using AutoHotkey? If so, could you please guide me on how to do it correctly? I'd appreciate any insights, suggestions, or corrections to my current code.
Thank you in advance for your help!
Need Help Binding Ctrl + Shift to Numpad2
Re: Need Help Binding Ctrl + Shift to Numpad2
Are you really using v2? You posted in the v2 section. As you were told the other day in another thread (to which you didn’t reply), you are writing v1 code and posting in the v2 section. You first need to determine which version you are using.
More specific to your question is that you are trying to send two modifier symbols. One of them would need to be a valid key name using correct syntax.
Please state which AHK version you are using so that the proper direction can be given.
More specific to your question is that you are trying to send two modifier symbols. One of them would need to be a valid key name using correct syntax.
Please state which AHK version you are using so that the proper direction can be given.
Re: Need Help Binding Ctrl + Shift to Numpad2
My fault. Im using v1. If possible, maybe Admin could move this thread to v1.
What would be a valid key using correct syntax?
What would be a valid key using correct syntax?
Last edited by gregster on 07 Aug 2023, 06:13, edited 1 time in total.
Reason: Moved topic to AHK v1 help.
Reason: Moved topic to AHK v1 help.
Re: Need Help Binding Ctrl + Shift to Numpad2
Try this:
Code: Select all
Numpad2::Send ^{Shift}
Re: Need Help Binding Ctrl + Shift to Numpad2
I really appreciate your help! but unfortunately it doesn't seem to work for me. What could I be doing wrong?
Re: Need Help Binding Ctrl + Shift to Numpad2
It may be that you didn’t describe your need adequately. This would press and immediately release Ctrl+Shift. Is that what you are trying to accomplish? Are you trying to have it hold those keys down? If so, when would they be released?
Re: Need Help Binding Ctrl + Shift to Numpad2
I would like it to emulate in the same way as if I were holding down Ctrl + Shift when I press Numpad 2. In other words, when I hold down Numpad 2, it's as if I'm holding down Ctrl + Shift, and when I release Numpad 2, I'm releasing Ctrl + Shift.
Re: Need Help Binding Ctrl + Shift to Numpad2
Try this:
Code: Select all
Numpad2::
Send {Ctrl down}{Shift down}
KeyWait, Numpad2
Send {Ctrl up}{Shift up}
return
Re: Need Help Binding Ctrl + Shift to Numpad2
Thank you, however, it doesn't seem to work; it gets stuck on ctrl+shiftboiler wrote: ↑07 Aug 2023, 08:28Try this:Code: Select all
Numpad2:: Send {Ctrl down}{Shift down} KeyWait, Numpad2 Send {Ctrl up}{Shift up} return
Re: Need Help Binding Ctrl + Shift to Numpad2
Possibly:
Code: Select all
#Requires AutoHotkey v1.1.33
Numpad2::
Send {Ctrl down}{Shift down}
SoundBeep 1500
Sleep 100
KeyWait NumpadDown
Send {Shift up}{Ctrl up}
SoundBeep 1000
Return
Re: Need Help Binding Ctrl + Shift to Numpad2
Good point, @mikeyww. Shift down with Numpad keys can/does change things, so it would change how it registers as a hotkey.
By the way, @Thunder, you reported someone's post in this thread to the forum staff as containing spam. I didn't see anything of the sort, so I assume that was a mistake and I closed the report.
By the way, @Thunder, you reported someone's post in this thread to the forum staff as containing spam. I didn't see anything of the sort, so I assume that was a mistake and I closed the report.
Re: Need Help Binding Ctrl + Shift to Numpad2
Thank you!mikeyww wrote: ↑07 Aug 2023, 09:57Possibly:
Code: Select all
#Requires AutoHotkey v1.1.33 Numpad2:: Send {Ctrl down}{Shift down} SoundBeep 1500 Sleep 100 KeyWait NumpadDown Send {Shift up}{Ctrl up} SoundBeep 1000 Return
Re: Need Help Binding Ctrl + Shift to Numpad2
Yes. Again, thank you!boiler wrote: ↑07 Aug 2023, 13:47Good point, @mikeyww. Shift down with Numpad keys can/does change things, so it would change how it registers as a hotkey.
By the way, @Thunder, you reported someone's post in this thread to the forum staff as containing spam. I didn't see anything of the sort, so I assume that was a mistake and I closed the report.