I didn’t see any way to select keyboard state buttons, such as CTRL/ALT/SHIFT, let alone having other keys pressed in combination. Are these simply absent from the back end of the new input system?
I wouldn’t say they’re absent from the back end, but I’m not using any of the newfangled action / rebinding stuff. You can get the .isPressed or .wasPressedThisFrame of any key you want. Eg. ctrlKey, altKey…
Add ButtonWithOneModifier or ButtonWithTwoModifiers composite.
There’s no support yet for having input on these bindings “preempt” each other. So having both a binding for B and a binding for SHIFT+B active will trigger both when SHIFT+B is pressed. Solving this is on the list.
Thanks everyone, I went with a structure similar to this, but approached it in a hard coded manner because I got a not a not blittable exception when I tried using actual KeyCodes from a Component. This makes certain other things (like remapping controls) difficult. Any further advice? or is this what I have for now?
public class MovementInputSystem : SystemBase
{
protected override void OnUpdate()
{
bool forward = Input.GetKey("w");
bool backward = Input.GetKey("s");
bool left = Input.GetKey("a");
bool right = Input.GetKey("d");
bool up = Input.GetKey("q");
bool down = Input.GetKey("e");
Entities
.WithAll<LocalPlayerControl>()