You can use preventDefault function of the onKeyDown event of input element if you know a character is not in english. How do you know it's not english? You can use my trick without using regular expressions:
in such events, event variable is of type KeyboardEventHandler.
(event: KeyboardEvent<HTMLInputElement>) => { if(event.code.toLowerCase().includes(event.key.toLowerCase())) return null event.preventDefault() /* prevent event from typing the character in input field as it is not an english character*/ }
this block of code checks if the pressed key character ("s") is included within the key code ("keyS") which is in english just be careful to check the lowercase values as it may run into some exceptions without checking that.