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

[gamepad] only two binds per command makes gamepad and keybaord+mouse impossible #564

Open
BielBdeLuna opened this issue Mar 18, 2024 · 6 comments

Comments

@BielBdeLuna
Copy link
Contributor

unfortunately Dhewm3 can only bound a pairs of button/key per command, like "shoot" -> "control" or "left mouse"

now if you bind "Shoot" to the gamepad "right trigger" and maybe also "A/X (in Sony terms)" for PDA ease of use, you unbind the mouse and the keyboard.

could it be possible to have a group of binds for Gamepad and another for keyboard+mouse so both can coexist together?

@BielBdeLuna
Copy link
Contributor Author

also pressing "A/X (in terms of Sony)" even when bound to "shoot" doesn't seem to work on the PDA, so I see that the PDA's UI and the Main menu's UI are input interactions are heavily hardcoded.

@DanielGibson
Copy link
Member

DanielGibson commented Mar 18, 2024

XBox A/Sony cross is hardcoded to emit a left mouse button event when a UI is focussed or the PDA is opened - no matter what it's bound to.

This is hacky, but there's nothing I can do about it, ingame UIs and especially the PDA are implemented in a real weird way, in the game code. The gamecode actually emulates a mouse there from input that's usually used for camera movement and shooting..
(this is also why the scroll wheel works in the main menu to scroll in menus, but not in the PDA)

The only reason I can imagine why it doesn't work for you in the PDA is that binding the gamepad buttons removed the left mouse button bind for fire.

I don't think having group binds is feasible.

Having more than two binds per command is possible, just not through the settings UI.
You can add additional binds through console commands or by editing the config.

But probably you don't really need more than two binds, for example for firing left mouse button and right trigger should suffice, because of the hardcoded logic for A/cross when a UI is focused.

@BielBdeLuna
Copy link
Contributor Author

Could it be possible to implement a way to identify what button is getting pressed? like a command via cvar "in_showInputPressed" 1/0, if on then any key or button pressed (mouse, keyboard, gamepad) identifies by name,

by the likes of: "\t'MOUSE3' has been pressed.\n"

so console binding is quite easier to use because the actual buttons are identified more easily.

@BielBdeLuna
Copy link
Contributor Author

added a pull request with a helper function like the one I proposed: #567

@DanielGibson
Copy link
Member

See https://github.com/DanielGibson/dhewm3/tree/imgui-rebased for a better bindings menu

@DanielGibson
Copy link
Member

#576

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

No branches or pull requests

2 participants