Hotstrings with modifier keys Topic is solved
Hotstrings with modifier keys
I want to set up a series of scripts that operate similar to the way entering unicode characters work in windows, when you press alt + and then the 4 digit code on the numpad for that character, except I want to use the left control key and a 4 digit sequential combination on the numpad to output a text string. How would I do this? The hotstring command on its own does not appear to accept modifiers like control as a valid key.
Re: Hotstrings with modifier keys
Hallo,
you certainly don't want to lose the function of left control key!
Here with Capslock:if you never need the Capslockstate:
you certainly don't want to lose the function of left control key!
Here with Capslock:
Code: Select all
#IF GetKeyState("CapsLock","P")
:?*X:1234::
SendInput, Hallo World
KeyWait, CapsLock
Send {CapsLock} ;Resets CapsLockState
#If
Code: Select all
CapsLock::Return
#IF GetKeyState("CapsLock","P")
:?*:1234::Hallo World
#If
Re: Hotstrings with modifier keys
my plan was to use a #IfWinActive function to restrict the script to the application I need to script these functions for, control is not really used natively in that application.
- Masonjar13
- Posts: 1555
- Joined: 20 Jul 2014, 10:16
- Location: Не Россия
- Contact:
Re: Hotstrings with modifier keys
You can use both.
Code: Select all
#if getKeyState("CapsLock","P") && winActive("WinTitle")
Re: Hotstrings with modifier keys Topic is solved
Hallo,
here with left control key only for Notepad:
here with left control key only for Notepad:
Code: Select all
#If WinActive("ahk_class Notepad")
LCtrl::Return
#IF GetKeyState("LCtrl","P") && WinActive("ahk_class Notepad")
:?*:1234::Hallo World
#If
Re: Hotstrings with modifier keys
This will work out great. Thanks a ton.Rohwedder wrote:Hallo,
here with left control key only for Notepad:Code: Select all
#If WinActive("ahk_class Notepad") LCtrl::Return #IF GetKeyState("LCtrl","P") && WinActive("ahk_class Notepad") :?*:1234::Hallo World #If
Who is online
Users browsing this forum: StupidIdiotMoron and 146 guests