The new field input can detect "which movement keys the player is pressing", quoting the official release note.
However it does not work with players looking at UI, like inventory. I do not know if this is intended. but it says "which keys is pressing" and it suggests that it should always work when the key is being pressed.
Steps To Reproduce:
- Run the following command in a repeating command block:
execute as @a at @s if predicate { "condition": "entity_properties", "entity": "this", "predicate": { "type_specific": { "type": "player", "input": { "right": true } } }} run say detected!
- Open inventory
- Press d, or the key that moves you to the right.
Expected Result:
The input would be detected inside the GUI.
Observed Result:
Nothing is detected, no say command is output.