I have an input which is a text field and I want the user to only be able to enter positive and negative numbers into this field. I have found other answers to this however they allow the minus sign to be entered at any point in the string where as I only want the minus sign to be entered at the first position of the string.
I also want the user to be able to use the keyboard arrow keys and any keyboard shortcuts for copying, cutting, pasting and selecting etc.