Input System with TMPro InputField gives error


I get this error every time if i click on a TMPro InputField but not with the normal InputField. I can change values with it, but it’s annoying to get this error every time.

Am receiving the same error using InputField (TMPro) with the new Input System package. Pasting error text for easier search results:

InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
UnityEngine.Input.GetKey (UnityEngine.KeyCode key) (at <2db13ba0d52343228aa9892c408fb49a>:0)
TMPro.TMP_InputField.OnPointerDown (UnityEngine.EventSystems.PointerEventData eventData) (at Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_InputField.cs:1673)

When the error pops up, select the file name in the stack-trace to jump to line #1673 of TMP_InputField.cs. Comment out the line and declare shift as false. There is no noticeable loss of functionality after trying all combinations of keys and mouse input, and the error has gone away.

//bool shift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift);
bool shift = false;

It works, but when I restart Unity it resets to default