He estado intentado remapear el acelerador del G27 para que cuando lo pise se pulse la W y el Mays. Pero no me figura como ningun eje de los que vienen en la ayuda de AHK. Por ejemplo con el embrague si lo he conseguido, es el eje U.
Como puedo saber cual es el eje del acelerador en el G27? Tambien queria saber si el valor obtenido de 70 es el máximo cuando el pedal esta soltado
Este es el codigo que he simplificado
Code: Select all
#Persistent ; Keep this script running until the user explicitly exits it.
SetTimer, WatchAxis, 5
return
WatchAxis:
GetKeyState, JoyU, JoyU ; Get position of X axis.
if JoyU > 60 && presionado = 1
{
Send, {w up} ; Release it.
Send, {Shift up} ; Release it.
presionado = 0
}
else if JoyU < 60
{
Send, {w down} ; Release it.
Send, {Shift down} ; Release it.
presionado = 1
}
Code: Select all
#Persistent ; Keep this script running until the user explicitly exits it.
SetTimer, WatchAxis, 5
return
WatchAxis:
GetKeyState, JoyX, JoyX ; Get position of X axis.
GetKeyState, JoyY, JoyY ; Get position of Y axis.
KeyToHoldDownPrev = %KeyToHoldDown% ; Prev now holds the key that was down before (if any).
if JoyX > 70
KeyToHoldDown = Right
else if JoyX < 30
KeyToHoldDown = Left
else if JoyY > 70
KeyToHoldDown = Down
else if JoyY < 30
KeyToHoldDown = Up
else
KeyToHoldDown =
if KeyToHoldDown = %KeyToHoldDownPrev% ; The correct key is already down (or no key is needed).
return ; Do nothing.
; Otherwise, release the previous key and press down the new key:
SetKeyDelay -1 ; Avoid delays between keystrokes.
if KeyToHoldDownPrev ; There is a previous key to release.
Send, {%KeyToHoldDownPrev% up} ; Release it.
if KeyToHoldDown ; There is a key to press down.
Send, {%KeyToHoldDown% down} ; Press it down.
return