Jump to content

Swap 2 keys problem


KoX
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...