Code: Select all
ALT & NUMPAD1::
Send b
KeyWait NUMPAD1
Return
I'd like the same behavior as when you'd type a symbol using ALT codes and Numpad
Code: Select all
ALT & NUMPAD1::
Send b
KeyWait NUMPAD1
Return
Code: Select all
!Numpad1::
nMode++
if nMode = 1
{
Send b
}
if nMode = 2
{
Send c
}
if nMode = 3
{
Send d
nMode = 0 ; Reset value
}
return
Code: Select all
NUMPAD3::
if keycount > 0
{
keycount += 1
return
}
keycount = 1
SetTimer, action, -300
return
action:
if keycount = 1
{
Send b
}
else if keycount = 2
{
Send c
}
keycount = 0
return
Code: Select all
Numpad3::
keyCount++
if keyCount = 2
{
Send c
keyCount = 0
}
SetTimer, action, -300
return
action:
if keyCount = 1
{
Send b
keyCount = 0
}
return
Code: Select all
F2::
if ( A_PriorHotkey = A_ThisHotkey && A_TimeSincePriorHotkey < 175)
{
SetTimer clic1, Off
ToolTip F2 Doble
}
else
SetTimer clic1, -175
KeyWait F2
return
clic1:
if ( GetKeyState("F2") )
ToolTip F2 Mantenido
else
ToolTip F2 Único
return
Code: Select all
NUMPAD3::
keyCount++
if (keyCount == 2){
SetTimer, action, off
GoSub, action
} else {
SetTimer, action, -300
}
return
action:
if (keycount == 1)
{
Send b
}
else if (keycount == 2)
{
Send c
}
keycount = 0
return
Code: Select all
#include Lib\TapHoldManager.ahk
thm := new TapHoldManager(, , 2) ; 2 is the "Max Taps" setting, limiting it to only 2 taps allowed
thm.Add("Numpad3", Func("Numpad3Func")) ; You could set "Max Taps" on a per-key basis here instead
return
Numpad3Func(isHold, taps){
if (isHold){
; Add code here if you want to respond to long press
} else {
; Respond to multi-tap
if (taps == 1){
Send b
} else if (taps == 2){
Send c
}
}
}
Code: Select all
#include Lib\TapHoldManager.ahk
thm := new TapHoldManager(, , 2) ; 2 is the "Max Taps" setting, limiting it to only 2 taps allowed
thm.Add("Numpad3", Func("Numpad3Func")) ; You could set "Max Taps" on a per-key basis here instead
thm.Add("Numpad4", Func("Numpad4Func"))
return
Numpad3Func(isHold, taps){
if (isHold){
; Add code here if you want to respond to long press
} else {
; Respond to multi-tap
if (taps == 1){
Send b
} else if (taps == 2){
Send c
}
}
}
Numpad4Func(isHold, taps){
if (isHold){
; Add code here if you want to respond to long press
} else {
; Respond to multi-tap
if (taps == 1){
Send d
} else if (taps == 2){
Send e
}
}
}
Code: Select all
#include Lib\TapHoldManager.ahk
thm := new TapHoldManager(, , 2) ; 2 is the "Max Taps" setting, limiting it to only 2 taps allowed
thm.Add("Numpad3", Func("KeyEvent").Bind("Numpad3")) ; You could set "Max Taps" on a per-key basis here instead
thm.Add("Numpad4", Func("KeyEvent").Bind("Numpad4"))
return
KeyEvent(keyName, isHold, taps){
static keyMappings := {Numpad3: ["b", "c"], Numpad4: ["d", "e"]}
if (isHold){
; Add code here if you want to respond to long press
} else {
; Respond to multi-tap
Send % keyMappings[keyName, taps]
}
}