It all depends on how you are doing the keyboard input. If you simply wait for keydown and charcode events, you will not be able to support complicated input methods.
For example, in Japanese, the user first types out characters phonetically, then hits spacebar to turn their line into Chinese symbols, even allowing for interactive editing of the substitutions in little popups.
Similarly, people who require assistive technology (e.g. screen readers for the blind) rely on software to use standard UI components like input fields which can be predictably scripted.
For TermKit, I realized I did not want to be subject to this limitation, so instead, it actually has a virtual "caret" object that places a chromeless text-field inside the command line. As you type and move around, it moves itself transparently. It tries to maintain its position as long as possible, to allow for things like Japanese input to work. Otherwise, any time input field is changed from JS, the native internal state is destroyed.
Steven