[Retail] Alt keypresses act as a gamepad modifier even when GamePadEmulateAlt = 'none'
schiffy91 opened this issue ยท 2 comments
Holding down ALT
changes the action bars -- even when the cvar GamePadEmulateAlt = 'none'
.
I find this problematic because the only self cast modifiers allowed in WoW's settings are CTRL
, SHIFT
, and ALT
. And because CTRL
and SHIFT
are the default modifiers used by ConsolePort, ALT
, which IIUC, is supposed to be an extended modifier that's supposed to be disabled by default, is also the only available modifier available for players to use for self casting. So, it'd make sense to remove ALT
integration from ConsolePort's action bars by default, and instead allow players to include this additional set of action bars if they need it. That is, if ALT
is not being emulated by the gamepad, then ConsolePort's UI shouldn't treat external key presses of ALT
a modifier that shows a new set of action bars.
Note: I am playing WoW with my Steam Deck, using Moonlight to stream it from my PC. I've configured my steam deck so that ALT
is mapped to R3
; a few other keys are mapped to back buttons like L3
, L4
, and R4
like TAB
that allow me to not only navigate Windows but also play most games without custom configurations. So I'm running into this issue.
To try and achieve this behavior, I went through the project this morning. I think the following code changes are needed to accomplish my feature request:
In ConsolePort_Bar/Core/Bar.lua
, at the very end of the file, the following state modifiers are setup:
RegisterStateDriver(Bar, 'modifier',
'[mod:alt,mod:ctrl,mod:shift] ALT-CTRL-SHIFT-;' ..
'[mod:alt,mod:ctrl] ALT-CTRL-;' ..
'[mod:alt,mod:shift] ALT-SHIFT-;' ..
'[mod:ctrl,mod:shift] CTRL-SHIFT-;' ..
'[mod:alt] ALT-; [mod:ctrl] CTRL-; [mod:shift] SHIFT-; ')
By default, it should probably look like:
RegisterStateDriver(Bar, 'modifier',
'[mod:ctrl,mod:shift] CTRL-SHIFT-;' ..
'[mod:ctrl] CTRL-; [mod:shift] SHIFT-; ')
Then the existing setting in the UI that is used to set the GamePadAltEmulation cvar
would not only set the key bind like it does today, but it'd also extend the registered state drivers to include all ALT
modifiers as above. That way, ALT
is only being used by ConsolePort when a player asks it to be used.
EDIT:
Doing the above successfully stops ALT
from interfering with the action bars. However, ConsolePort doesn't seem to emulate ALT
+ [ A
, B
, Y
, X
, R1
, L1
, DPAD
] properly -- in fact, I'm pretty sure ALT
is just being ignored as a modifier for these key chords. I'm not familiar enough with ConsolePort to make these changes, but I think this is probably related to the emulation of input -- I imagine ALT
needs to be setup as a modifier that ConsolePort will respond to for every keybinding?
I don't know where to make those changes in ConsolePort, so I've instead come up with a hacky workaround for self casting. In addition to removing the code above, I've bound LS
to self target and RS
to previous enemy, which allows me to get by. It's clunkier than I'd like, and it doesn't address all use cases. For example, if I was healing a tank, needed to heal myself, and then needed to heal the tank again -- but I can live with that for now by using the Steam Deck's trackpads for targeting.
Thinking about this more: I think the more generalized problem is that ConsolePort needs a way to handle self healing modifiers, which, by default is ALT
. My hunch is that requires a lot of registering/unregistering key codes -- but it's a worthwhile change IMO given how important self healing is in WoW.
Kudos on a great Addon. Left a sponsorship for a subscription and coffee!
I'm actually restructuring the bar code entirely to maintain the plug and play aspect but allow customization like this. The idea is that you would be able to configure response modifiers on a per button basis, or on a cluster basis, where you're free to define what a button cluster actually contains. It would also allow you to use a self-target modifier. The current bar code is made to be as simple as possible and therefore doesn't allow this level of customization. It's a relic of CP1 which was ported in a couple days to fit into CP2 before the launch of Shadowlands, and since it has a low standard compared to the rest of CP it's under reconstruction.
There is nothing special about the ALT modifier afaik, it's just that it's treated this way by the action bar code because ALT was not a modifier used in CP1. The reason for it is simple, CP1 was based on emulated keyboard input, and ALT combined with many inputs in Windows will do stuff like exit the program or fire other default Windows commands. It was added as a bolt on in CP2 since ALT was now available, but it does not care about which modifiers you actually use.