Announcement

Collapse
No announcement yet.

AHK used with reWASD

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • AHK used with reWASD

    Hello,

    I was able to remap the keyboard button with reWASD. When the key on the keyboard is pressed the function gets executed.
    I remapped the Numpad5 to behave as an "A" on the Xbox One controller.
    When I wrote the script in AHK to press Numpad5, nothing happens. I can't figure out why that is.

    The keyboard works, but AHK doesn't.

  • #2
    Hello,
    Thank you for your report.

    Seems that it works. I made a video about how did I use AHK and reWASD - https://streamable.com/3y3mc.
    So, it's a simple script with a message box showing a string when Esc button pressed. Save the file with the required extension, convert via AutoHotkey app and run the exe file. Map the Esc button to the controller "A" button. Pressing A button it triggers the message box.

    What's your script and ho do you proceed? Please correct me if I misunderstood you. Please provide steps that you try to follow and scrip you made for the case.
    Don't worry! Be Happy!

    Comment


    • #3
      Thank you for the video. My AHK code is a bit different.
      I could not tell if you were running the AHK code, or pressing the button on the Keyboard or Controller.
      I am trying to run the AHK and not press anything on the controller or keyboard. I need AHK to do all the pressing.

      Numpad5 = A on Xbox One controller (in your case it was the "Esc" button)
      Code that I have tried:

      Send, {Numpad5}
      Sleep, 250
      Send, {Numpad5}
      Sleep, 250
      Send, {Numpad5}

      And I have tried this:

      Send, {Numpad5 Down}
      Sleep, 100
      Send, {Numpad5 Up}
      Sleep, 100
      Send, {Numpad5 Down}
      Sleep, 100
      Send, {Numpad5 Up}
      Sleep, 100


      Thank you

      Comment


      • #4
        Hello!

        I think AHK sends virtual key presses, while reWASD is waiting for the actual press from the physical keyboard.

        Am I right, you need a kind of unlimited script that will press A controller button with small pauses for pretty long time?

        Comment


        • #5
          Yes, you are correct. For some reason, virtual key presses do not work with reWASD. I have been looking for a workaround for a while, but can't seem to find one.
          I have tried creating a different script in AHK, I have tried running everything as Admin, I have tried with and without "unmap" feature in the reWASD.

          Comment


          • #6
            reWASD works with physical devices, this is the reason why it doesn't detect something virtual from a third-party app.
            But I think, you can achieve the needed behavior using reWASD only.

            Still, you will need to activate this script using something (just one button press, for example).

            Then, here is a combo I suggest. Here, A button is pressed during 30 ms, and then we have a pause — 250 ms.

            Click image for larger version

Name:	dd29bb6830.jpg
Views:	1712
Size:	30.1 KB
ID:	218208

            On the next step, add Toggle option (1) to the button you use for this combo (2):

            Click image for larger version

Name:	bfe7a4a7cd.jpg
Views:	1702
Size:	47.3 KB
ID:	218209

            In order to start this script, you will need to press "1" once. Then, it will be repeatedly pressing A controller button until you press "1" again.

            I understand that you will need to activate it once, but I think it may work in your case.

            Comment


            • #7
              I am assuming that Iterations are loops, so if I set that at like 5, "A" will be pressed down and released 5 times with a 30 ms delay every 250 ms.
              How do I get to this menu and what is "Delay between keys"?

              I think that this will work after I set it all up correctly. It would be easier if reWASD communicated with 3rd party software like AutoHotKey.

              Comment


              • #8
                Hello,
                Thank you for your reply.

                If you need A button pressed 5 times in a row, then use the iterations instead of the toggle. The combo sequence is the same but please add iteration (2) option which is the number of times the combo reproduces after the single press (5 times in your case, please, see the screenshot). Also, you may add pauses between the iteration if you need it.

                The delay between keys is the pause that will reproduce between the elements of a sequence. Basically it is the same pause that you set manually between elements of a combo, so you may set as zero if you prefer to add pauses between combo elements by yourself.
                Don't worry! Be Happy!

                Comment

                Working...
                X