AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

help remap joy button to ctrl+alt

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
dj_anubis
Guest





PostPosted: Sun Oct 18, 2009 8:23 pm    Post subject: help remap joy button to ctrl+alt Reply with quote

hello everyone

here is a script i am used to run
Code:

WaitFor1joy4:
if not GetKeyState("1joy4")  ; The button has been released.
{
    Send {alt up}  ; Release the RALT.
    SetTimer, WaitFor1joy4, off  ; Stop monitoring the button.
    return
}
; Since above didn't "return", the button is still being held down.
Send {alt down}  ; Send another RALT keystroke.
return


1joy5::
Send {ctrl down}   ; Press the RALT down.
SetTimer, WaitFor1joy5, 50  ; Reduce the number 30 to 20 or 10 to send keys faster. Increase it to send slower.
return

WaitFor1joy5:
if not GetKeyState("1joy5")  ; The button has been released.
{
    Send {ctrl up}  ; Release the RALT.
    SetTimer, WaitFor1joy5, off  ; Stop monitoring the button.
    return
}
; Since above didn't "return", the button is still being held down.
Send {ctrl down}  ; Send another RALT keystroke.
return


basiclly its a script which do the following thing

if i press the joystick button 5, the computer "thinks" i pressed CTRL

and if i press joystick button 4, th computer "thinks" i pressed ALT

here is what i need


I want that when i press Joystick button 6, the computer will think that i pressed CTRL+ALT

please help me, it shouldn`t be hard problem, i think

waiting for your reply, thank you[/code]
Back to top
txquestor



Joined: 22 Aug 2009
Posts: 294

PostPosted: Sun Oct 18, 2009 9:59 pm    Post subject: Reply with quote

I added the joy6 in red to your script.
Just replace your script with the new one.

Code:


WaitFor1joy4:
if not GetKeyState("1joy4")  ; The button has been released.
{
    Send {alt up}  ; Release the RALT.
    SetTimer, WaitFor1joy4, off  ; Stop monitoring the button.
    return
}
; Since above didn't "return", the button is still being held down.
Send {alt down}  ; Send another RALT keystroke.
return


1joy5::
Send {ctrl down}   ; Press the RALT down.
SetTimer, WaitFor1joy5, 50  ; Reduce the number 30 to 20 or 10 to send keys faster. Increase it to send slower.
return

WaitFor1joy5:
if not GetKeyState("1joy5")  ; The button has been released.
{
    Send {ctrl up}  ; Release the RALT.
    SetTimer, WaitFor1joy5, off  ; Stop monitoring the button.
    return
}
; Since above didn't "return", the button is still being held down.
Send {ctrl down}  ; Send another RALT keystroke.

WaitFor1joy6:
if not GetKeyState("1joy6")  ; The button has been released.
{
    Send {ctrl up}{alt up}  ; Send Ctrll+Alt
    SetTimer, WaitFor1joy6, off  ; Stop monitoring the button.
    return
}
Send {ctrl down}{alt down}  ; Send another Ctrl+Alt keystroke.



return

_________________

"Man's quest for knowledge is an expanding series whose limit is infinity"
Back to top
View user's profile Send private message
dj_anubis
Guest





PostPosted: Mon Oct 19, 2009 12:15 am    Post subject: thank you Reply with quote

thank you very much bro Razz

You helped me A LOT!!! Wink
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group