I have a textbox that I want to the user to write something in it. I want that the default language there would be english. so if he pressed alt-shift before he came to my page and he is now on other language - when he'll come to my textbox it would change his language to english. Is it possible with javascript? how?
This is not possible, but the thing is possible is check if the char is english. It will forbid chars from Chineese, Russian etc...
I'm not sure what you mean by "pressing Alt-Shift". Are you referring to the keyboard layout switching hotkey in recent versions of MS Windows?
If yes, then the answer is "no". The layout switching is performed by the operating system and not accessible from Javascript. Which is a good thing, BTW. You would not want a webpage (or even a local application) to switch around your keyboard layout.
Incidentally, I do not understand why you would want to change the layout. If the user is comfortable with, say, a German or French layout, how does it help to change the layout?
Maybe you could elaborate on your problem. What are you trying to solve?