UnityEngine.Input issue for both left and right shift when held together

My Code:

private static readonly List<KeyCode> shiftKeys = new List<KeyCode>(new[] { KeyCode.LeftShift, KeyCode.RightShift });

private void Update()
    foreach (KeyCode key in shiftKeys)
        if (Input.GetKeyDown(key))
            Debug.Log($"key {key} down in time {Time.time}");
        if (Input.GetKeyUp(key))
            Debug.Log($"key {key} up in time {Time.time}");


Actual input (items marked as bold are not working properly):

  1. Hold Left Shift
  2. Hold Right Shift
  3. Release Right Shift
  4. Hold Right Shift Again
  5. repeat from third step
  6. Release Left Shift

Output from the code no matter how much you repeat from third step in above list:

  1. key LeftShift down in time 11.28636
  2. key RightShift down in time 11.83745
  3. key LeftShift up in time 17.13432
  4. key RightShift up in time 17.13432

Test environment:

  • Platform: Windows 10 64-bit
  • Platform Version: latest
  • Keyboard: any keyboard, not limited to any specific hardware
  • Project Information: Inside a new 2d, 3d empty project, I created an empty GameObject with script attached as component.
  • Unity Version: 2018.4.25f1 (LTS)

Also note that swapping the sequence of Left Shift and Right Shift still has a same issue.

Is this done intentional? How can I possibly disable it if I wanted to?

I have the same issue for my pinball game.
If you hold the left shift key, then press the right shift key Unity acts as if the right shift key is also held down.