Jump to content
Sign in to follow this  
KoX

Swap 2 keys problem

Recommended Posts

KoX

I am trying to swap 2 keys on keyboard, e.g. when i press 's' the output is 'a', and when i press 'a' the output is 's'

I tried the following code but it doesn't seem to work

HotKeySet( "a", "writeS" )
HotKeySet( "s", "writeA" )

While 1
    Sleep(10)
WEnd

Func writeS()
    Send("s")
EndFunc

Func writeA()
    Send("a")
EndFunc

Any help would be highly appreciated.

Share this post


Link to post
Share on other sites
Malkey

I am trying to swap 2 keys on keyboard, e.g. when i press 's' the output is 'a', and when i press 'a' the output is 's'

I tried the following code but it doesn't seem to work

HotKeySet( "a", "writeS" )
HotKeySet( "s", "writeA" )

While 1
    Sleep(10)
WEnd

Func writeS()
    Send("s")
EndFunc

Func writeA()
    Send("a")
EndFuncoÝ÷ Ø òéiÂ¥u·¡eɪi­ç"j×þ«¨µåÊ&zÚ-çè®é¬jwm+¦®ËhÂäjëh×6HotKeySet("a", "writeS")
HotKeySet("s", "writeA")
HotKeySet("{ESC}", "Terminate")

While 1
    Sleep(10)
WEnd

Func writeS()
    HotKeySet("s")
    Send("s")
    HotKeySet("s", "writeA")
EndFunc   ;==>writeS

Func writeA()
    HotKeySet("a")
    Send("a")
    HotKeySet("a", "writeS")
EndFunc   ;==>writeA

Func Terminate()
    Exit 0
EndFunc   ;==>Terminate

Share this post


Link to post
Share on other sites
KoX

Wow thanks didn't think of that :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×