Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One Stick is Being Mapped to Two Controllers and I Can't Tell Why #18

Open
UncleLeoTheDad opened this issue Jan 14, 2021 · 4 comments
Open

Comments

@UncleLeoTheDad
Copy link

I thought I had everything working, but I just ran some tests on gamepad-tester.com and am seeing some strange behavior. Here's my mapping:

{
    "LShiftKey": [0, "A"],
    "Z": [0, "B"],
    "LControlKey": [0, "X"],
    "LMenu": [0, "Y"],

    "D1": [0, "Start"],
    "D5": [0, "Back"],
    
    "Up": [0, "Up"],
    "Down": [0, "Down"],
    "Left": [0, "Left"],
    "Right": [0, "Right"],

    "Space": [0, "RightBumper"],
    "X": [0, "RightTrigger"],



    "W": [1, "A"],
    "C": [1, "B"],
    "A": [1, "X"],
    "S": [1, "Y"],

    "D2": [1, "Start"],
    "D6": [1, "Back"],
    
    "R": [1, "Up"],
    "F": [1, "Down"],
    "D": [1, "Left"],
    "G": [1, "Right"],

    "Q": [1, "RightBumper"],
    "T": [1, "RightTrigger"],




    "O": [2, "A"],
    "Oem1": [2, "B"],
    "RControlKey": [2, "X"],
    "RShiftKey": [2, "Y"],

    "D3": [2, "Start"],
    "D7": [2, "Back"],
    
    "I": [2, "Up"],
    "K": [2, "Down"],
    "J": [2, "Left"],
    "L": [2, "Right"],

    "Return": [2, "RightBumper"],
    "Oem7": [2, "RightTrigger"],



    "M": [3, "A"],
    "OemPeriod": [3, "B"],
    "B": [3, "X"],
    "E": [3, "Y"],

    "D4": [3, "Start"],
    "D8": [3, "Back"],
    
    "Y": [3, "Up"],
    "N": [3, "Down"],
    "V": [3, "Left"],
    "U": [3, "Right"],

    "H": [3, "RightBumper"],
    "D9": [3, "RightTrigger"]
}

The keyboard is actually triggered via iPAC, which I've confirmed is mapped correctly and separately. That said, whenever I use the joystick for player three (index 2), gamepad-tester shows both player 1 and player 3 being triggered. In other words Index2.Up ("I") seems to also trigger Index0.Up. Index0.Up ("Up") does NOT trigger Index2.Up.

Now the funny thing is that my button mappings for Index 0 and Index 2 work fine and are kept separate. My only guess is that you have some defaults set up for the Analog sticks that are somehow still getting utilized. Could that be? If so, is there a way to have a single key map to both d-pad up and analog-left up to keep things consistent?

Thanks!

@mikew
Copy link
Owner

mikew commented Jan 14, 2021

My only guess is that you have some defaults set up for the Analog sticks that are somehow still getting utilized. Could that be?

Nope, there's no defaults. The closest thing this project has to a default is a single mapping that can't be modified or deleted (so there's always a working base).

If you pass in an empty config (just {}), does gamepad-tester show anything when using your sticks? Same question with a minimal config like { "I": [2, "Up"] }

Does running xarcade-xinput with the --debug flag give any insight?

is there a way to have a single key map to both d-pad up and analog-left up to keep things consistent?

Not at the moment, and it's a little tricky to add support for it based on the way mappings are written and referenced .

@UncleLeoTheDad
Copy link
Author

This is what debug shows me:

S:\Arcade\Accessories\XArcade-XInput>"XArcade XInput.exe" --debug
Loading mapping from S:\Arcade\Accessories\XArcade-XInput\mappings\RetroArcade - Player 1 2 3 4.json
Loading mapping for LShiftKey ...
Loading mapping for Z ...
Loading mapping for LControlKey ...
Loading mapping for LMenu ...
Loading mapping for D1 ...
Loading mapping for D5 ...
Loading mapping for Up ...
Loading mapping for Down ...
Loading mapping for Left ...
Loading mapping for Right ...
Loading mapping for Space ...
Loading mapping for X ...
Loading mapping for W ...
Loading mapping for C ...
Loading mapping for A ...
Loading mapping for S ...
Loading mapping for D2 ...
Loading mapping for D6 ...
Loading mapping for R ...
Loading mapping for F ...
Loading mapping for D ...
Loading mapping for G ...
Loading mapping for Q ...
Loading mapping for T ...
Loading mapping for O ...
Loading mapping for Oem1 ...
Loading mapping for RControlKey ...
Loading mapping for RShiftKey ...
Loading mapping for D3 ...
Loading mapping for D7 ...
Loading mapping for I ...
Loading mapping for K ...
Loading mapping for J ...
Loading mapping for L ...
Loading mapping for Return ...
Loading mapping for Oem7 ...
Loading mapping for M ...
Loading mapping for OemPeriod ...
Loading mapping for B ...
Loading mapping for E ...
Loading mapping for D4 ...
Loading mapping for D8 ...
Loading mapping for Y ...
Loading mapping for N ...
Loading mapping for V ...
Loading mapping for U ...
Loading mapping for H ...
Loading mapping for D9 ...
1/14/2021 04:44:52 PM Trace Scanning resources for routes...
1/14/2021 04:44:52 PM Trace Generating routes for assembly XArcade XInput
1/14/2021 04:44:52 PM Trace Generating routes from type DefaultRestResource
1/14/2021 04:44:52 PM Trace Generated route GET / > XArcade_XInput.DefaultRestResource.Index
1/14/2021 04:44:52 PM Trace Generated route GET /api/status > XArcade_XInput.DefaultRestResource.Status
1/14/2021 04:44:52 PM Trace Generated route POST /api/controller/stop > XArcade_XInput.DefaultRestResource.ControllerStop
1/14/2021 04:44:52 PM Trace Generated route POST /api/controller/start > XArcade_XInput.DefaultRestResource.ControllerStart
1/14/2021 04:44:52 PM Trace Generated route POST /api/keyboard/stop > XArcade_XInput.DefaultRestResource.KeyboardStop
1/14/2021 04:44:52 PM Trace Generated route POST /api/keyboard/start > XArcade_XInput.DefaultRestResource.KeyboardStart
1/14/2021 04:44:52 PM Trace Generated route GET /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardGetMapping
1/14/2021 04:44:52 PM Trace Generated route POST /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardSetMapping
1/14/2021 04:44:52 PM Trace Generated route OPTIONS /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardMappingOptions
1/14/2021 04:44:52 PM Trace Generated route DELETE /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardDeleteMapping
1/14/2021 04:44:52 PM Trace Generated route POST /api/keyboard/mapping/current > XArcade_XInput.DefaultRestResource.KeyboardSetCurrentName
1/14/2021 04:44:52 PM Trace Generated route POST /api/keyboard/mapping/rename > XArcade_XInput.DefaultRestResource.KeyboardRenameMapping
1/14/2021 04:44:52 PM Trace Listening: http://+:32123/
Started KeyboardMapper
1/14/2021 04:44:52 PM Info Routing Request : be503e2c5d74 - GET / has 1 routes
1/14/2021 04:44:52 PM Trace Route Invoked : be503e2c5d74 - 1/1 XArcade_XInput.DefaultRestResource.Index
1/14/2021 04:44:52 PM Trace Routing Complete : be503e2c5d74 - 1 of 1 routes invoked
Started ControllerManager
1/14/2021 04:44:53 PM Info Routing Request : 24469c5b1832 - GET /api/status has 1 routes
1/14/2021 04:44:53 PM Info Routing Request : a182fa1e12f7 - GET /api/keyboard/mapping has 1 routes
1/14/2021 04:44:53 PM Trace Route Invoked : 24469c5b1832 - 1/1 XArcade_XInput.DefaultRestResource.Status
1/14/2021 04:44:53 PM Trace Routing Complete : 24469c5b1832 - 1 of 1 routes invoked
1/14/2021 04:44:53 PM Error Route Not Found For GET /favicon.ico
1/14/2021 04:44:53 PM Trace Route Invoked : a182fa1e12f7 - 1/1 XArcade_XInput.DefaultRestResource.KeyboardGetMapping
1/14/2021 04:44:53 PM Trace Routing Complete : a182fa1e12f7 - 1 of 1 routes invoked

I will explore your other suggestions now.

@UncleLeoTheDad
Copy link
Author

Hmmmm this look suspicious...

I restarted debug again and got more info on startup:

S:\Arcade \Accessories\XArcade-XInput>"XArcade XInput.exe" --debug
Loading mapping from S:\Arcade\Accessories\XArcade-XInput\mappings\RetroArcade - Player 1 2 3 4.json
Loading mapping for LShiftKey ...
Loading mapping for Z ...
Loading mapping for LControlKey ...
Loading mapping for LMenu ...
Loading mapping for D1 ...
Loading mapping for D5 ...
Loading mapping for Up ...
Loading mapping for Down ...
Loading mapping for Left ...
Loading mapping for Right ...
Loading mapping for Space ...
Loading mapping for X ...
Loading mapping for W ...
Loading mapping for C ...
Loading mapping for A ...
Loading mapping for S ...
Loading mapping for D2 ...
Loading mapping for D6 ...
Loading mapping for R ...
Loading mapping for F ...
Loading mapping for D ...
Loading mapping for G ...
Loading mapping for Q ...
Loading mapping for T ...
Loading mapping for O ...
Loading mapping for Oem1 ...
Loading mapping for RControlKey ...
Loading mapping for RShiftKey ...
Loading mapping for D3 ...
Loading mapping for D7 ...
Loading mapping for I ...
Loading mapping for K ...
Loading mapping for J ...
Loading mapping for L ...
Loading mapping for Return ...
Loading mapping for Oem7 ...
Loading mapping for M ...
Loading mapping for OemPeriod ...
Loading mapping for B ...
Loading mapping for E ...
Loading mapping for D4 ...
Loading mapping for D8 ...
Loading mapping for Y ...
Loading mapping for N ...
Loading mapping for V ...
Loading mapping for U ...
Loading mapping for H ...
Loading mapping for D9 ...
1/14/2021 04:50:50 PM Trace Scanning resources for routes...
1/14/2021 04:50:50 PM Trace Generating routes for assembly XArcade XInput
1/14/2021 04:50:50 PM Trace Generating routes from type DefaultRestResource
1/14/2021 04:50:50 PM Trace Generated route GET / > XArcade_XInput.DefaultRestResource.Index
1/14/2021 04:50:50 PM Trace Generated route GET /api/status > XArcade_XInput.DefaultRestResource.Status
1/14/2021 04:50:50 PM Trace Generated route POST /api/controller/stop > XArcade_XInput.DefaultRestResource.ControllerStop
1/14/2021 04:50:50 PM Trace Generated route POST /api/controller/start > XArcade_XInput.DefaultRestResource.ControllerStart
1/14/2021 04:50:50 PM Trace Generated route POST /api/keyboard/stop > XArcade_XInput.DefaultRestResource.KeyboardStop
1/14/2021 04:50:50 PM Trace Generated route POST /api/keyboard/start > XArcade_XInput.DefaultRestResource.KeyboardStart
1/14/2021 04:50:50 PM Trace Generated route GET /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardGetMapping
1/14/2021 04:50:50 PM Trace Generated route POST /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardSetMapping
1/14/2021 04:50:50 PM Trace Generated route OPTIONS /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardMappingOptions
1/14/2021 04:50:50 PM Trace Generated route DELETE /api/keyboard/mapping > XArcade_XInput.DefaultRestResource.KeyboardDeleteMapping
1/14/2021 04:50:50 PM Trace Generated route POST /api/keyboard/mapping/current > XArcade_XInput.DefaultRestResource.KeyboardSetCurrentName
1/14/2021 04:50:50 PM Trace Generated route POST /api/keyboard/mapping/rename > XArcade_XInput.DefaultRestResource.KeyboardRenameMapping
1/14/2021 04:50:50 PM Trace Listening: http://+:32123/
Started KeyboardMapper
Started ControllerManager
1/14/2021 04:50:52 PM Info Routing Request : f4bfe32edbad - GET / has 1 routes
1/14/2021 04:50:52 PM Trace Route Invoked : f4bfe32edbad - 1/1 XArcade_XInput.DefaultRestResource.Index
1/14/2021 04:50:52 PM Trace Routing Complete : f4bfe32edbad - 1 of 1 routes invoked
1/14/2021 04:50:53 PM Info Routing Request : 9393dcf84258 - GET /api/keyboard/mapping has 1 routes
1/14/2021 04:50:53 PM Info Routing Request : 6ee11aa09ab6 - GET /api/status has 1 routes
1/14/2021 04:50:53 PM Trace Route Invoked : 6ee11aa09ab6 - 1/1 XArcade_XInput.DefaultRestResource.Status
1/14/2021 04:50:53 PM Trace Routing Complete : 6ee11aa09ab6 - 1 of 1 routes invoked
1/14/2021 04:50:53 PM Trace Route Invoked : 9393dcf84258 - 1/1 XArcade_XInput.DefaultRestResource.KeyboardGetMapping
1/14/2021 04:50:53 PM Trace Routing Complete : 9393dcf84258 - 1 of 1 routes invoked
1/14/2021 04:50:53 PM Error Route Not Found For GET /favicon.ico
Controller #2 Y Button Down
Keyboard: S
Keyboard: S + None
Controller #2 Y Button Up
Keyboard: None
Keyboard: All keys released
Controller #4 Y Button Down
Keyboard: E
Keyboard: E + None
Controller #2 Up Button Down
Keyboard: E + None + R
Controller #1 Up Button Down
Keyboard: E + None + R + Up
Controller #4 Y Button Up
Keyboard: None + R + Up
Keyboard: R + Up
Controller #2 Up Button Up
Keyboard: Up
Controller #1 Up Button Up
Keyboard: All keys released
Controller #4 Left Button Down
Keyboard: V
Keyboard: V + None
Controller #1 Left Button Down
Keyboard: V + None + Left
Controller #4 Left Button Up
Keyboard: None + Left
Keyboard: Left
Controller #1 Left Button Up
Keyboard: All keys released
Controller #3 Up Button Down
Keyboard: I
Keyboard: I + None
Controller #1 Up Button Down
Keyboard: I + None + Up
Controller #2 B Button Down
Keyboard: I + None + Up + C
Controller #3 Up Button Up
Keyboard: None + Up + C
Keyboard: Up + C
Controller #1 Up Button Up
Keyboard: C
Controller #4 Y Button Down
Keyboard: C + E
Controller #2 B Button Up
Keyboard: E
Controller #4 Y Button Up
Keyboard: All keys released
Controller #2 Y Button Down
Keyboard: S
Keyboard: S + None
Controller #2 Y Button Up
Keyboard: None
Keyboard: All keys released
Controller #4 Y Button Down
Keyboard: E
Keyboard: E + None
Controller #2 Up Button Down
Keyboard: E + None + R
Controller #1 Up Button Down
Keyboard: E + None + R + Up
Controller #4 Y Button Up
Keyboard: None + R + Up
Keyboard: R + Up
Controller #2 Up Button Up
Keyboard: Up
Controller #1 Up Button Up
Keyboard: All keys released
Controller #4 Left Button Down
Keyboard: V
Keyboard: V + None
Controller #1 Left Button Down
Keyboard: V + None + Left
Controller #4 Left Button Up
Keyboard: None + Left
Keyboard: Left
Controller #1 Left Button Up
Keyboard: All keys released
1/14/2021 04:55:36 PM Info Routing Request : dee638191ccf - POST /api/keyboard/stop has 1 routes
Stopped KeyboardMapper
1/14/2021 04:55:36 PM Trace Route Invoked : dee638191ccf - 1/1 XArcade_XInput.DefaultRestResource.KeyboardStop
1/14/2021 04:55:36 PM Trace Routing Complete : dee638191ccf - 1 of 1 routes invoked
1/14/2021 04:55:36 PM Info Routing Request : e3a0253926a9 - POST /api/controller/stop has 1 routes
Stopped ControllerManager
1/14/2021 04:55:37 PM Trace Route Invoked : e3a0253926a9 - 1/1 XArcade_XInput.DefaultRestResource.ControllerStop
1/14/2021 04:55:37 PM Trace Routing Complete : e3a0253926a9 - 1 of 1 routes invoked

This piece is suggestive:

Controller #2 Up Button Down
Keyboard: E + None + R

It looks like that second control is being mapped to two letters: E and R. I have no idea why given the mapping above. Or am I misreading?

@mikew
Copy link
Owner

mikew commented Jan 14, 2021

It's definitely concerning, the number of None's reported. I've never seen that, and loading your config and using it with a regular keyboard doesn't have this issue.

And yeah, you may be reading it incorrectly. Those Keyboard: ... lines are simply reporting whatever keyboard keys are currently being pressed, whether they're mapped or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants