Use of the LCtrl + LShift + Numpad5 Combination

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Alexander2
Posts: 348
Joined: 27 Apr 2019, 17:38

Use of the LCtrl + LShift + Numpad5 Combination

Post by Alexander2 » 28 Sep 2022, 03:09

I have tried to use the following script to launch the specified application if it is not running and to activate it if it is running, but the key combination LCtrl + LShift + Numpad5 does not work. Does anyone know how this combination can be used?

Code: Select all

#If GetKeyState("LShift", "P")
<^Numpad5::
IfWinNotExist ahk_exe opera.exe
{
run % """C:\Users\prg13\AppData\Local\Programs\Opera\launcher.exe"""
WinWait, ahk_exe opera.exe, , 3
WinActivate ahk_exe opera.exe
}
else
WinActivate ahk_exe opera.exe
return
#If

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

Re: Use of the LCtrl + LShift + Numpad5 Combination

Post by Rohwedder » 28 Sep 2022, 04:08

Hallo,
try:

Code: Select all

#If GetKeyState("LShift", "P")
<^NumpadClear::SoundBeep
https://www.autohotkey.com/docs/KeyList.htm#numpad

Alexander2
Posts: 348
Joined: 27 Apr 2019, 17:38

Re: Use of the LCtrl + LShift + Numpad5 Combination

Post by Alexander2 » 28 Sep 2022, 10:25

Rohwedder wrote:
28 Sep 2022, 04:08
Hallo,
try:

Code: Select all

#If GetKeyState("LShift", "P")
<^NumpadClear::SoundBeep
https://www.autohotkey.com/docs/KeyList.htm#numpad
Thank you. There is no descriptive label on the Numpad5 key on my keyboard, unlike some other Numpad keys. So I thought that this key does not have a secondary function. Now I can see that it has a certain “Clear” function, so that NumpadClear should be written in the script.

Post Reply

Return to “Ask for Help (v1)”