TransWikia.com

How to activate Set 2 while game controller button is on hold using Antimicro?

Arqade Asked by threeFatCat on March 24, 2021

I’m using Antimicro to map my Mocute-050 bluetooth controller to play The Witcher 3 Wild Hunt.

I’ve been reading the previous questions regarding “combo key” in the github page, but it seems it is not what I was expecting.

What I wanted:

Is to mimic the behavior in the “Set Selector [num] While Held” that when a [key] is pressed hold and unhold will toggle the select set. While normal [key] press will activate the default assigned function.

The problem is when I set the Macro:

Hold 0.50s > Set Select 2 > Release 0.01s > [TAB] > Release 0.49s

or

Release 0.01s > [TAB] > Release 0.49s >Hold 0.50s > Set Select 2

The after hold Set Select will not activate until you release the key which is opposite what I wanted is to keep it hold down, after releasing the key Set Select should no longer be active.

Is it a bug?

One Answer

Summary

TL;DR: The short version is that there is a workaround but it does not meet the requirements exactly (skip to Workarounds section below for this).

That said, it's probably less a bug and more a limitation (explained in more detail below). The UI should probably label the Advanced option as "Set Selection as 1-way". You could still submit a feature request with something like "Request: Ability to use same button for Set Selection While Held and Send Key When Pressed" and explain your use-case; but keep in mind that at the time this answer was written (July 2020), there haven't been any active commits on the project since Mar 2017.

Preface

I understand this is question was asked some time ago and the OP may have moved on. However, I came across this post while attempting something similar for TW2 and since there were no existing answers, I thought I would make the attempt in case others might find it useful.

The OP sounds like an experienced Antimicro user. I will try to satisfy the original question but will be breaking it down a bit further for the benefit of less experienced users that might come upon this post.

Problem

If I am understanding the question correctly, then the requirements are as follows:

  1. Want to configure a press and hold combination
  2. The PRESS action should map to a regular 1:1 keyboard binding to the TAB key
  3. The HOLD action should map to Selecting Set 2
  4. The Set Selection should work only when HELD (as opposed to simply toggling the Set Selection to Set 2)

Recreating OP's setup

Here is how to re-create the OP's first setup. Note that I am going to use a mapping to D instead of TAB since that is easier to read when testing the profile in a text-editor. You don't have to use the same controller or bindings that I do, but I am going to write it with what I used.

  1. Setup Antimicro with a wireless xbox 360 controller and created a new profile
  2. Choose a button that will be different on the 2 sets so that you have something to test with; you can remap this later if you want. I will use X on the gamepad.
  3. On Set 2: click the X button then press Q key on the keyboard to create the mapping (set 2): X -> Q
  4. On Set 1: click the X button then press W key on the keyboard to create the mapping (set 1): X -> W
  5. I will be using Left shoulder as my modifier button; On Set 1, click the L shoulder button
  6. When the dialog for "Set L Shoulder" comes up, click on the Advanced button in the lower left corner.
  7. On the left side, Assignments should be pre-selected; if not, click on it. The next remaining steps will all be on the right-side of Assignments.
  8. From the drop-down, choose Hold. Then from the time drop-downs select so it has 0m, 0, .5 , and 0s. The Time label to the left should read: 0m 0.50s
  9. Click the Insert button to define the next assignment
  10. From the drop-down we will now define our HOLD action. Normally, we would use Blank of KB/M and pick a 1:1 keyboard mapping. To meet the OP's requirement, we will instead select Set Change from the drop-down, then Select Set 2 from the second drop-down that appears.
  11. Click the Insert button to define the next assignment
  12. Pick Release from the drop-down and set the time to 0m 0.01s
  13. Click the Insert button to define the next assignment
  14. Pick Blank of KB/M then click in the white square of the rightmost/selected assignment box and press D (we will replace this with tab later but for now it is more visible for testing).
  15. Click the Insert button to define the next assignment
  16. Pick Release from the drop-down and set the time to 0m 0.49s
  17. Click the Insert button; we're not going to define another assignment but this seems to help antimicro save the state of the final assignment correctly.
  18. Click the Close button on the Advanced dialog
  19. Confirm: It should return you to the "Set L Should" dialog (one with a keyboard). Look a couple lines above the close button and there should be a label displaying the actions we just configured from the Advanced dialog. It should read: Hold 00.50, Set Change 2, Release 00.01, D, Release 00.49; if it is missing anything then go back and fix it now. When it is correct, click the Close button to return to the main screen.
  20. Click Save button up top - otherwise Antimicro will lose everything up to now if the controller goes into sleep mode (wireless) or gets unplugged (wired) or the app closes (either).
  21. At this point, open a text editor and test. You should see that pressing X on the controller types w and pressing L Shoulder types d. Hold L Should for a second and press X and it should type q. However, antimicro has toggled to Set 2 and is stuck there

This meets requirements #1-3 but not requirement #4. Reading the documentation on Set Selection shows us that there are a lot of variables when working with sets. In particular, Sets can be 1-way or 2-way toggles or can operate only when some modifier button is held. Specific buttons can also be exempted from a set (antimicro terminology is "disabling set switching" [for the given button]). It basically boils down to that fact that you can't define an assignment that is triggered on release and have it apply while held down. The second method in the OP is also relying on Release and so will have the same issue.

So this method works fine for normal button to keypress Tap/Hold mappings or even for 1-Way Set Selection toggles but appears to not support 2-Way/When Held sets. Is it a bug? That's hard to say objectively. I'm guessing here but I believe it is more likely to be a limitation than a bug. I'm not sure if this is a limitation of the current UI or a limitation of what is possible when using the Release assignments. If 1-Way toggles are the only type of Set Selection possible using this approach, it would make sense to relabel the option in the drop-down to "Set Selection (1-Way)" to convey this. If not, it would make sense to provide options after selecting Set Selection so the user can choose more granular behavior (e.g. 1-Way, 2-Way, or While Held).

Personally, I would request this as a "feature request" rather than as a bug; I don't say this to be pedantic but rather because in software development circles the term bug can imply something is not working according to some arbitrary original design standard and can occasionally frustrate devs that are picky about ticket categorization (e.g. you generally want to avoid stepping on toes when requesting free help). At least, that has been my experience.

Workarounds?

1. Toggle with counter-mapping

There is a workaround that gives a similar same effect but there are differences. It may be acceptable for some and not for others.

If you understand that the drop-down in the previous steps really means "Set Selection (1-Way)", then you can simply define a corresponding rule in Set 2 for the same gamepad button (L Shoulder in my example above) and map both the press and hold to Set 1 (e.g. Hold 00.50, Set Change 1, Release 00.01, Set Change 1, Release 00.49). However, you will want to play with this configuration in a text-editor and notice the differences. I saw that it mostly worked as expected but was not perfect: in particular, it has the following limitations:

  • With this workaround, pressing the modifier button gives one mapping and holding (toggle) switches sets. It definitely takes some mental adjustment to press LB / hold-release LB (switch to set 2) + press X + hold-release LB (switch to set 1)
  • It is possible for antimicro to unexpectedly end up in the wrong mode; you can obviously fix this by pressing/holding the button one more time, but depending on you setup your layout, that could be something too risky for in-game combat etc. You could mitigate this by disabling certain buttons from layout switches. Lets say you want Right Shoulder to ALWAYS map to F, regardless of Set, then you can right-click on "R Shoulder" > Set Select > Disabled; it will then be excluded from set changes. Alternately, you can just define the mapping in both sets (you may need to do this for triggers anyway as they don't have a Set Select menu option).

2. Choose a different layout

Only other option that I am aware of for the current version (AntiMicro v2.23) is to simply make a less complex layout that doesn't attempt to use the two features.

Answered by zpangwin on March 24, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP