Compare commits

...

2 commits

Author SHA1 Message Date
c4ef6885b6 proto merge 2022-10-24 15:25:47 +02:00
aa0db150ee intentar parametrizar ya volvere o no 2022-10-24 15:22:10 +02:00
2 changed files with 84 additions and 59 deletions

View file

@ -1,7 +1,3 @@
Merece la pena todo esto? Prototipo con AHK: flechas en letras.
Puede que no, mas tampoco OW2 Utilizar o compilar con AHKv1.
e igualmente se hizo.
- Gato gamer

View file

@ -1,63 +1,90 @@
CapsLock & j:: ; UP LEFT DOWN RIGHT
shiftState := GetKeyState("Shift", "P") keyboardActions := {"i" : "Up", "j" : "Left", "k" : "Down" , "l" : "Right"}
ctrlState := GetKeyState("Ctrl", "P") ;keyboardKeys := ["i", "j", "k", "l"]
switch (shiftState + ctrlState) { ;actions := ["Up", "Left", "Down", "Right"]
case 0:
SendInput {Left}
return
case 1:
SendInput, % ((shiftState == 1) ? ("+{Left}") : ("^{Left}"))
return
case 2:
SendInput ^+{Left}
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
}
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
}
return
;parseKey(keyboardKey) {
; for key, value in keyboardActions
; if (value == keyboardKey)
; return value
; return 0
;}
/*
CapsLock & i:: CapsLock & i::
CapsLock & j::
CapsLock & k::
CapsLock & l::
MsgBox % "testt"
*/
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 % "Fail!"
return
}
return
}
CapsLock & k::
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 % "Fail!"
return
}
return
}
CapsLock & l::
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 % "Fail!"
return
}
return
}
CapsLock & i::
loop {
shiftState := GetKeyState("Shift", "P") shiftState := GetKeyState("Shift", "P")
ctrlState := GetKeyState("Ctrl", "P") ctrlState := GetKeyState("Ctrl", "P")
switch (shiftState + ctrlState) { switch (shiftState + ctrlState) {
@ -71,10 +98,11 @@ CapsLock & i::
SendInput ^+{Up} SendInput ^+{Up}
return return
default: default:
MsgBox % "menudo gilipolls" MsgBox % "Fail!"
return return
} }
return return
}
/* /*
myVarWithKeystrokes := "+john+doe{Tab}+pas+sw0rd{Enter}" myVarWithKeystrokes := "+john+doe{Tab}+pas+sw0rd{Enter}"
@ -95,3 +123,4 @@ case 1:
*/ */
Esc::ExitApp Esc::ExitApp
/*Esc::ExitApp*/