Rune580 / LethalCompanyInputUtils

GNU Lesser General Public License v3.0
12 stars 5 forks source link

[FEATURE REQUEST] UI Support for Multiple (And Composite) Bindings on an Action #21

Open Valafi opened 8 months ago

Valafi commented 8 months ago

Is your feature request related to a problem? Please describe. I'm making an autocomplete mod for the terminal. I have my "Autocomplete" action set to the "tab" key. Pressing it repeatedly cycles through the autocomplete list.

I then decided to add a composite binding of "ctrl+tab" to the same action with a processor of "invert" so that the autocomplete list can be cycled in reverse. Here I ran into a problem where the default binding was getting triggered before my composite binding could be (I was getting a value of 1 instead of -1). The only way I found I could fix it was to override the default binding with an empty path, and re-add it after the composite binding.

At this point, I realized that the UI only shows the default binding created by the API (which is now blank). It does not show my composite binding or re-added binding.

Describe the solution you'd like Ideally, the UI could handle showing all of the bindings for actions (including composites).

Describe alternatives you've considered I considered putting the composite binding on a separate action, but that's almost the same issue, because the UI is still only showing the default binding here too.

Additional context I understand this is a pretty large request, so I apologize in advance if you decide to tackle it!

Rune580 commented 8 months ago

I'll have to think of a good way to represent composite bindings in UI. On the topic of the default binds being prioritized, going to have to look into it more to see if I can figure out a solution for that too.