TimothyLuke / GSE-Advanced-Macro-Compiler

GSE is an alternative advanced macro editor and engine for World of Warcraft.
https://discord.gg/gseunited
MIT License
216 stars 73 forks source link

[ENH] Add support for controller buttons for keybinding sequences #1533

Closed Rumik closed 3 months ago

Rumik commented 3 months ago

🟢 How does GSE currently work When creating a keybinding for a GSE sequence, the addon does not correctly detect controller buttons.

🟢 Describe the solution you'd like I would like the addon to detect and support controller buttons for keybindings.

🟢 Describe alternatives you've considered I have tried binding RB to 1 and binding my GSE macro to 1 but it doesn't appear to work, because 1 is also on the action bar. If I could bind the sequence to RB on my controller, it might work.

🟢 Additional context I use ConsolePort to play WoW, and I have historically assigned the GSE macro to a button and use another app (e.g. Steam Input) to add a repeat to the button press, so I can one-button enable and disable the HSE macro. This is no longer possible as keybinding is required to trigger a GSE sequence.

TimothyLuke commented 3 months ago

I’m sorry but This is simply not possible.

Wows new rules are a macro (ConsolePort) cannot click another macro (GSE Sequence).

I need Blizzard/wowace to fix the KeyBind widget as it cannot see Controller clicks. See https://github.com/TimothyLuke/GSE-Advanced-Macro-Compiler/issues/1525

TimothyLuke commented 3 months ago

Going to leave this open just so hopefully someone sees that it’s been thought of.

TimothyLuke commented 3 months ago

Some further info. GSE uses AceGUi’s keybind widget. This doesn’t support console controllers. As sequence names need to be known before the data storage is loaded, GSE also can’t use the keybind thing in the new options panel added with Dragonflight.

Is there anyway someone can grab a Gamepad trigger from the keybind xml cache in WTF? I don’t know if it’s possible but I wonder if from seeing that there is some way I can jury rig the keybind command.

Coopecl commented 3 months ago

So....

I found these two files. Gamepad config for my Xbox Elite controller, which doesn't require anything like Console Port to work with the game. Someone else's Gamepad config may be different, depending on how WoW recognizes the buttons on their controller.

And then the character specific GSE keybind file.

I took a gamble and just copied the name of the gamepad button name over the '2' I had tried previously set the keybind to.

WoW's Gamepad Config & GSE Character Keybind(s): Screenshot 2024-07-26 111528 Screenshot 2024-07-26 111434

GSE recognizing the button name...and it does indeed work: https://youtu.be/-Eq_ZetlsrE

Rumik commented 3 months ago

This is promising! I think it would help if I had a sequence that worked! No-one over at LazyMacros has added any new Arms Warrior sequences for the pre-patch, so it's hard to tell if it'll work. I'm keeping my fingers crossed tho!

lloskka commented 3 months ago

This is promising! I think it would help if I had a sequence that worked! No-one over at LazyMacros has added any new Arms Warrior sequences for the pre-patch, so it's hard to tell if it'll work. I'm keeping my fingers crossed tho!

I have, wtf you dont browsee deep enough ( dicaprio.gif )

TimothyLuke commented 3 months ago

There’s your first problem- going to WLM.

I just have no way of detecting the click from the controller in the widget.

Rumik commented 3 months ago

Is there a better source for sequences than LazyMacros?

Rumik commented 3 months ago

This is promising! I think it would help if I had a sequence that worked! No-one over at LazyMacros has added any new Arms Warrior sequences for the pre-patch, so it's hard to tell if it'll work. I'm keeping my fingers crossed tho!

I have, wtf you dont browsee deep enough ( dicaprio.gif )

You got a link? Cause I'm not seeing anything for Arms.

TimothyLuke commented 3 months ago

I would try the GSE Discord  https://discord.gg/3t2QPpxz. And the GSE United https://discord.gg/dA9Mc6upTimothyLukeOn 27 Jul 2024, at 5:39 AM, Ryan Brain @.***> wrote:

This is promising! I think it would help if I had a sequence that worked! No-one over at LazyMacros has added any new Arms Warrior sequences for the pre-patch, so it's hard to tell if it'll work. I'm keeping my fingers crossed tho!

I have, wtf you dont browsee deep enough ( dicaprio.gif )

You got a link? Cause I'm not seeing anything for Arms.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>

Rumik commented 3 months ago

Thanks I’ve joined the first Discord, but the only sequences I see posted are the ones already on WLM, and the beta Arms one posted there last month is the newest, which doesn’t work. The second Discord’s link has expired.I think I’ll have to see if I can add a sequence of my own.CheersOn 26 Jul 2024, at 22:05, Timothy Minahan @.> wrote: I would try the GSE Discord  https://discord.gg/3t2QPpxz. And the GSE United https://discord.gg/dA9Mc6upTimothyLukeOn 27 Jul 2024, at 5:39 AM, Ryan Brain @.> wrote:

This is promising! I think it would help if I had a sequence that worked! No-one over at LazyMacros has added any new Arms Warrior sequences for the pre-patch, so it's hard to tell if it'll work. I'm keeping my fingers crossed tho!

I have, wtf you dont browsee deep enough ( dicaprio.gif )

You got a link? Cause I'm not seeing anything for Arms.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Rumik commented 3 months ago

I got it working in the end. Think it broke during the upgrade. Deleting the variables seemed to fix it. Thanks, all.

Sarrion970 commented 3 months ago

hi. i also use ConsolePort and GSE. it works for me but, I also use reWASD https://www.rewasd.com/ I think there is a Free version but if not it was cheap like $30 ( after you choose all option for the software there is a discount) or less for entire program. how I have it setup is-- 1. create the macro like oak in this video https://www.youtube.com/watch?v=t5wQavbZoYE&t=98s @ time 1:33 in video for creating the macro in wow.

  1. then assign key bindings in GSE 3.2 to keyboard buttons 1 and 2 on keyboard. 3. then i use reWASD and assign my keyboard buttons 1 & 2 to the X button and Y button in reWASD software, here you can also set the MS for the macro to auto spam the button. works great for me so far --Sarrion
Coopecl commented 3 months ago

hi. i also use ConsolePort and GSE. it works for me but, I also use reWASD https://www.rewasd.com/ I think there is a Free version but if not it was cheap like $30 ( after you choose all option for the software there is a discount) or less for entire program. how I have it setup is-- 1. create the macro like oak in this video https://www.youtube.com/watch?v=t5wQavbZoYE&t=98s @ time 1:33 in video for creating the macro in wow. 2. then assign key bindings in GSE 3.2 to keyboard buttons 1 and 2 on keyboard. 3. then i use reWASD and assign my keyboard buttons 1 & 2 to the X button and Y button in reWASD software, here you can also set the MS for the macro to auto spam the button. works great for me so far --Sarrion

The one problem I've had with third party encoders is the lack of support for having "SHIFT/CTRL" buttons set on the controller.

As WoW's integration is now, I am able to use LTrigger as an Action bar button, AND it can act as SHIFT+ to hit secondary functions of say my "A, B, X, Y" buttons. On top of that, I can assign a CTRL modifier to hit tertiary functions. Other third party handlers often break with 'n' key presses.

TimothyLuke commented 3 months ago

I will not be looking at any third party encoders. If I can make this work with what is supported in game I will.

TimothyLuke commented 3 months ago

@Coopecl Any chance you could upload a copy of GamePadConfig_Default.json rather than an image? I don't have it in my install at all.

TimothyLuke commented 3 months ago

The manual way to set this is:

/run GSE_C["KeyBindings"][tostring(GetSpecialization())]["KEY"] = "SEQUENCE"

eg:

/run GSE_C["KeyBindings"][tostring(GetSpecialization())]["PADRTRIGGER"] = "SEQUENCE"

GetSpecialization() returned a number from 1 to 4 depending on the spec you are in. You could replace this with ["1"] etc in the order the spoecs appear on the Talents Frame.

/run GSE_C["KeyBindings"]["2"]["PADRTRIGGER"] = "SEQUENCE"
Coopecl commented 3 months ago

@Coopecl Any chance you could upload a copy of GamePadConfig_Default.json rather than an image? I don't have it in my install at all.

Yeah, when I get home I’ll toss over the file if you still need it. My config is how WoW "enumerates" the controller buttons, but it may differ from a different controller/if they’re using an input encoder.

Granted, I can see how the controller to keyboard translation would work with some third party encoders. I rather run less background processes though and WoW’s controller interpretation works great as is.

Coopecl commented 3 months ago

@Coopecl Any chance you could upload a copy of GamePadConfig_Default.json rather than an image? I don't have it in my install at all.

GamePadConfig_Default.json

TimothyLuke commented 3 months ago

image Fixed in 3.2.01-12

TimothyLuke commented 3 months ago

Ther emay be fancy names for these entires and icons and also may be things missing but these can be added as I am made aware of them

Coopecl commented 3 months ago

I was having trouble last night getting it to save when setting a Special Keybind. I tried it again with like using '2' on the keyboard and that saved.

Also, some Specials were returning PADLSHOULDER, instead of what I chose.

I ended up reverting to the release build on the 24th, and modifying the lua in the desktop space like before to get my button back.

I’ll try again tonight with the latest build and record a better resolution clip of what’s going on. Oh, at some point, I couldn’t open the Keybind settings at all, not from the right click context of the macro, or the /gse main menu. Again, I’ll grab video.

TimothyLuke commented 3 months ago

Did an update for this again this morning

Coopecl commented 3 months ago

Special Keybinds are now saving in the latest build.

PADLTRIGGER and PADRSHOULDER are still returning PADLSHOULDER. Looks like those are the only two. https://youtu.be/Nhx97CbiGu0?si=tCwgr2A88HNpx5zF

TimothyLuke commented 3 months ago

Talking with Munk from ConsolePort:

Munk — Today at 20:51 It's such an easy fix too since the gamepad bindings are fully compatible with the rest of the binding system. Just basically need

frame:EnableGamePadButton(true) 
button:SetScript("OnGamePadButtonDown", Keybinding_OnKeyDown)

Munk — Today at 20:53 So this is a bit of an oversimplification of things. Gamepads use modifiers just like kb/m do, so the actual amount of keybindings you're looking at including in that list is somewhere around 80-100 different bindings. Which is why I think the appropriate solution is to fix the Ace widget. If it just accepts the gamepad input it would probably "just work".

TimothyLuke commented 3 months ago

Native Support for KeyBinding controller buttons is now enabled with GSE 3.2.07 - This allows for Shift- Ctrl- etc to also work via a controller.