Electronicks / JoyShockMapper

A tool for PC gamers to play games with DualShock 4s, JoyCons, and Pro Controllers. Gyro aiming, flick stick.
Other
343 stars 20 forks source link

[Feature Request] More Explicit Release Event Modifiers #64

Open pie75 opened 2 years ago

pie75 commented 2 years ago

VirtaMancer's suggestion from the discord:

  1. "Smart On Release Modifier", that only runs if an Hold modifier preceded it (not necessarily immediately in the chain, but at least somewhere before it in the chain) or
  2. A new modifier for On Release, so you have
    • on start press no modifier
    • on release press /
    • on start hold _
    • on release hold ~
pie75 commented 2 years ago

My own input is slightly different,

Because action layer changes do not apply immediately to inputs that are already being held, (thus the input must be reset and re-pressed) there are modifier limitations that they cannot work around, thus for a more concise input experience, we require a few niche modifiers that are more explicit than the ones we currently have.

I'll be using the timing diagram from the README.md

                                        less than 150 ms hold time
    150 ms hold time    80ms turbo period          V         500 ms for gyro and calibration
            V                 V                    |------|< actions or 40 ms otherwise
______|-----|---|---|---|---|---|--|___________|---|____________
      \____________________________/           \___/      |
      |     |   |   |   |   |   |  |           |   |      |
     (a)   (b) (c) (c) (c) (c) (c)(d)         (a) (d)    (g)
           (c)                    (f)             (e)
a: start press \
b: hold press _
c: turbo +
d: release press /
e: tap press '
f: hold release
g: tap release
Events a, b, c, d and e have an Instant Release event attached to them 40ms after they occur.

We currently have "4" 'start press' event modifiers, however, there is only one release modifier, Notably, modifiers for timings (f) and (g) are missing. Combined into the two (d)'s I think that the functionality provided by the timings (f) and (g) (or, separations of the (d) ) are extremely useful to have explicitly separately, and my suggestion for their binding would be: hold release: ~ tap release: <

Hold release ~ should explicitly only trigger if a hold binding would have been triggered. Tap release < should explicitly only trigger if a tap binding would have been triggered.

I believe that a turbo release * modifier would also be useful. It should repeatedly send the key only after the input has been released. I think this would only be valid with a toggle modifier ^, seeing as it would need to be disabled somehow. Perhaps a more robust solution might be to move turbo from an event modifier into being two action modifiers, however that would break compatibility, right?

My take on the 'Smart Release Modifier' | is slightly different: This modifier should trigger after the previous binding is released, and only after that binding is released, for example: S = A B| C_ would send B after A is released, but not after C is released.

I think that explicit modifiers should be preferred, and are simpler to implement, however, a 'smart release' might be useful in future.