Re: Universal Control Remapper (UCR) - v0.1.19 26th Dec 2017
Posted: 22 Jan 2018, 05:20
If memory serves, what is going on is this:
Joystick POV directions are handled by GetKeyState(), so I had to build my own arrays to hold what happened for any given direction, so I went the extra mile and made it work with multiple bindings per POV direction.
Joystick buttons are handled by hotkey (ie a mapping to 1Joy3::). There can only be one of these per "thread" and seeing as both plugins are in the same profile, they use the same input thread. Seeing as the hotkey system ties a button to a boundfunc, I did not have to build custom arrays to handle this like for hat directions, so I did not make it compatible with multiple bindings per key.
In order to properly solve this, we would need to alter the core code of UCR to allow multiple bindings to the same Joystick button in the same profile.
The way around this without coding is to use UCR's profile switcher as the shift state mechanism. That way, each sub-profile only needs one mapping to each input, and so does not fall foul of this issue.
To allow multiple bindings to the same joystick button, the AHK_JoyBtn_Input class would need to be altered:
https://github.com/evilC/UCR/blob/maste ... d.ahk#L280
An array would need to be built something like this:
Joystick POV directions are handled by GetKeyState(), so I had to build my own arrays to hold what happened for any given direction, so I went the extra mile and made it work with multiple bindings per POV direction.
Joystick buttons are handled by hotkey (ie a mapping to 1Joy3::). There can only be one of these per "thread" and seeing as both plugins are in the same profile, they use the same input thread. Seeing as the hotkey system ties a button to a boundfunc, I did not have to build custom arrays to handle this like for hat directions, so I did not make it compatible with multiple bindings per key.
In order to properly solve this, we would need to alter the core code of UCR to allow multiple bindings to the same Joystick button in the same profile.
The way around this without coding is to use UCR's profile switcher as the shift state mechanism. That way, each sub-profile only needs one mapping to each input, and so does not fall foul of this issue.
To allow multiple bindings to the same joystick button, the AHK_JoyBtn_Input class would need to be altered:
https://github.com/evilC/UCR/blob/maste ... d.ahk#L280
An array would need to be built something like this:
Code: Select all
{
1Joy3: {
<ControlGuid>: <BoundFunc>,
<ControlGuid>: <BoundFunc>
},
2Joy3: {
<ControlGuid>: <BoundFunc>,
<ControlGuid>: <BoundFunc>
}
}