Two ToolTips and Keyboard Layers are Toggled by Pressing a Key Combination
-
- Posts: 1
- Joined: 19 Mar 2023, 21:28
Two ToolTips and Keyboard Layers are Toggled by Pressing a Key Combination
I am trying to make an AHK script so that when I press control and `, my keys remap themselves like f::p and k::d. And then if I press the keycombo again (^`) then it toggles back to the orginal default key presses (I.E. f::f and k::k). Simultaneously, a ToolTip pops up when toggling back and forth that says "keys are default" or "keys are custom" depending on which one is true.
Re: Two ToolTips and Keyboard Layers are Toggled by Pressing a Key Combination
Welcome to this AutoHotkey forum!
Here is the same thing but with a toggle.
Here is the same thing but with a toggle.
Code: Select all
; This script toggles a remap of multiple keys
#Requires AutoHotkey v2.0
remap := True
swap
^`::swap
#HotIf remap
f::p
k::d
#HotIf
swap() {
Global remap
If remap := !remap {
ToolTip 'Keys are custom'
SoundBeep 1500
} Else {
ToolTip 'Keys are default'
SoundBeep 1000
}
}