intentar parametrizar ya volvere o no

This commit is contained in:
OugonNoHane 2022-10-24 15:22:10 +02:00
commit aa0db150ee

View file

@ -1,63 +1,90 @@
CapsLock & j::
shiftState := GetKeyState("Shift", "P")
ctrlState := GetKeyState("Ctrl", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Left}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Left}") : ("^{Left}"))
return
case 2:
SendInput ^+{Left}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
; UP LEFT DOWN RIGHT
keyboardActions := {"i" : "Up", "j" : "Left", "k" : "Down" , "l" : "Right"}
;keyboardKeys := ["i", "j", "k", "l"]
;actions := ["Up", "Left", "Down", "Right"]
;parseKey(keyboardKey) {
; for key, value in keyboardActions
; if (value == keyboardKey)
; return value
; return 0
;}
/*
CapsLock & i::
CapsLock & j::
CapsLock & k::
CapsLock & l::
MsgBox % "menudo gilipolls"
*/
CapsLock & j::
loop {
ctrlState := GetKeyState("Ctrl", "P")
shiftState := GetKeyState("Shift", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Left}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Left}") : ("^{Left}"))
return
case 2:
SendInput % ("^+{keyboardActions[""j""]}")
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
CapsLock & k::
shiftState := GetKeyState("Shift", "P")
ctrlState := GetKeyState("Ctrl", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Down}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Down}") : ("^{Down}"))
return
case 2:
SendInput ^+{Down}
return
default:
MsgBox % "menudo gilipolls"
return
loop {
shiftState := GetKeyState("Shift", "P")
ctrlState := GetKeyState("Ctrl", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Down}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Down}") : ("^{Down}"))
return
case 2:
SendInput ^+{Down}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
CapsLock & l::
shiftState := GetKeyState("Shift", "P")
ctrlState := GetKeyState("Ctrl", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Right}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Right}") : ("^{Right}"))
return
case 2:
SendInput ^+{Right}
return
default:
MsgBox % "menudo gilipolls"
return
loop {
ctrlState := GetKeyState("Ctrl", "P")
shiftState := GetKeyState("Shift", "P")
switch (shiftState + ctrlState) {
case 0:
SendInput {Right}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Right}") : ("^{Right}"))
return
case 2:
SendInput ^+{Right}
return
default:
MsgBox % "menudo gilipolls"
return
}
return
}
return
CapsLock & i::
loop {
shiftState := GetKeyState("Shift", "P")
ctrlState := GetKeyState("Ctrl", "P")
switch (shiftState + ctrlState) {
@ -75,6 +102,7 @@ CapsLock & i::
return
}
return
}
/*
myVarWithKeystrokes := "+john+doe{Tab}+pas+sw0rd{Enter}"
@ -94,4 +122,5 @@ case 1:
}
*/
Esc::ExitApp
Esc::ExitApp