Jump to content

Looking to cancel a keystroke to fully rebind keys


Recommended Posts

Hey im looking to rebind my wasd keys to arrow keys in order to play a game using my phone and chrom remote access. I tried using controlsend to send a arrow keys when i push wasd. Problem lies in that it sends both w (for example) and the up arrow key aswell as asd etc. Any ideas how to get around this?

Link to comment
Share on other sites

_HotKey("w")
_HotKey("a")
_HotKey("s")
_HotKey("d")
_HotKey("x")
Func _HotKey($hotkey = "")
    Switch @HotKeyPressed

        Case "w"
            Send("{up}")
        Case "a"
            Send("{left}")
        Case "s"
            Send("{down}")
        Case "d"
            Send("{right}")
        Case "x"
            Exit 0 * MsgBox(64 + 262144, Default, "Exit", 1)
        Case Else
            If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed)
            If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.")
    EndSwitch

EndFunc   ;==>_HotKey



While Sleep(100) ; here should be your application.
WEnd ; meanwhile, here is a dummy loop.

 

Edited by Exit

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

  • Moderators

Scripthen, as has been stated again and again and again - just report the post and move alone (done, now). The Mod team will deal both with the OP and anyone dumb enough to provide them what they're after.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

Scripthen,

You have just earned yourself a short holiday from the forum - we do not want that kind of language here.

Exit;

Which part of " in order to play a game " in the OP was not clear? Last warning to you not to help those who are blatantly breaking the rules.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...