void Update() if (Input.GetKeyDown(KeyCode.LeftShift)) Debug.Log("ShiftPressed"); Don't work

So, I have issues with the shift key in a scrip and did manage to remove most of the logic to just this line that won’t produce a console log and I can’t find any reason for it not to work.

void Update() if (Input.GetKeyDown(KeyCode.LeftShift)) Debug.Log(“ShiftPressed”);

I do not know how you have it exactly written in the code and I do not know if you are still looking for a solution to this problem, but write it like this

void Update() {
    if (Input.GetKeyDown(KeyCode.LeftShift)) Debug.Log("ShiftPressed");
}

works correctly