+1 vote

Hello Everyone,

I've successfully implemented a keybindings menu for the player in my game. They are able to select from a list of predefined actions and assign any key/gamepad button they wish to that action.

However, the functions I've used to create this functionality, like: "actionaddevent(action, event)" assign only one event to the action. Is there a function that will help me assign (for ex) "Shift + W" to an action?

I know I can manually assign "Modifier + key" directly to the Input Map myself, and I can also manually check iskeypressed() through code, but both of these solutions won't allow for the player to choose their own keybindings because it either forces the modifier key to the action, and/or relies on the default map I give them from the start.

Are there any hidden techniques or secret functions that can help with this?
Thanks in advance!

Godot version 3.4.2
in Engine by (31 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.