Is there a way I can know what characters are getting inputed from keyboard? Are they English or Arabic?
You are going to struggle to find a fool proof way of doing this. For example is this text English or Arabic: "78978789789" ? My point is you can guess based on the Unicode value of the String, but this will fail when encounter characters shared between English and Arabic.
I'm not sure why you need to stop English being entered when the application expects Arabic and viceversa. Can you explain why this is a problem?