giants115

Help Programming Keyboard Remapping

2 posts in this topic

#1 ·  Posted (edited)

hey guys so I am trying to remap my WASD keys to my arrows keys. Im writing this myself because i want to be able to quickly turn it on and off without rebooting my computer (I didn't see any software that does that). I have two problems with my script right now. 

1. While holding the keys my laptop track pad wont move. (I need to be able to use the mouse simultaneously)

2. It responds Very choppily. Im going for like a hold till I release button but it seems to be rapidly pressing the key.

 

here is my code any help would be appreciated.

 

#include <Misc.au3>

HotKeySet("w", "remapW")
HotKeySet("a", "remapA")
HotKeySet("s", "remapS")
HotKeySet("d", "remapD")
while 1

WEnd
Func RemapW()
   While _IsPressed(57)
   Send("{UP}")
   WEnd
EndFunc

Func RemapA()
      While _IsPressed(41)
    Send("{LEFT}")
    WEnd
EndFunc

Func RemapS()
      While _IsPressed(53)
    Send("{DOWN}")
    WEnd
EndFunc

Func RemapD()
   While _IsPressed(44)
   Send("{RIGHT}")
   WEnd
EndFunc

 

Edited by giants115

Share this post


Link to post
Share on other sites



#2 ·  Posted

Welcome to AutoIt and the forum!

Seems you have missed to read the forum rules on your way in. Please do so now!
Especially the part about game automation - which isn't allowed here.
That's why you won't get any help on this subject.

Hope to see you soon with a legitimate question :)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.