Click to See Complete Forum and Search --> : simulate ALT+SHIFT in Javascript


Joeyboy
October 8th, 2004, 09:11 AM
I work in a bi-directional (mid-east) environment.
I have an application "htmlArea" that allows user input in a kind of wordprocessor way with buttons for justification, bold, italic, font size etc etc. and turns it into HTML. It is open source (htmlArea.js) and programmable.
I added a button that changes the cursor direction + alignment to
"right aligned and right-to-left input" and of course a button to reverse this. I did that with the function(e) {e.execCommand("blockdirrtl");e.execCommand("justifyright");}
That's fine.
What I don't know how to accomplish is to make the button also change the keyboard input language.
Manually, that is done on Mid-East systems by pressing ALT+SHIFT which toggles from EN to AR (Arabic) or HE (Hebrew) depending on the settings.
Is there a way to program in a java *.js file the change to another keyboard language? In other words to simulate ALT+SHIFT through code.
That would enable me to make the application behave like the mid-east versions of Word that have one button that does all three together: change of justification + change of direction + change of language. (And of course another button to reverse to English input.

Any help would be appreciated.