make HOME button behave properly in command window

Now, when the caret is in the input area, the HOME button will
move the caret to the current input limit, instead of the beginning of
the line.