It seem to me that for a task like writing homework, it would be complete overkill to try anything fancy or low-level. So I would suggest instead to go with something like this, which just applies in the current notebook and also just for the particular vector you use most commonly:
SetOptions[EvaluationNotebook[],
InputAutoReplacements -> {"aa" -> ToBoxes[
\!\(\*OverscriptBox[\(a\), \(\[RightVector]\)]\)]}]
Now if you type aa
followed by a space, it will immediately change to $\vec{a}$.
Also be aware that you should use such constructs primarily for typesetting. Don't try using things like $\vec{a}$ in the same way you would use variables, unless you know what you're doing. See this tutorial and search for issues related to subscripted symbols. The same warnings apply to vectors.
Edit: general vectors
The above is the fastest method to input specific vectors. To do something similar for arbitrary vectors, you will need more keystrokes. First enter
SetOptions[EvaluationNotebook[],
InputAutoReplacements ->
{"vv" -> OverscriptBox["\[NegativeMediumSpace]\[SelectionPlaceholder]",
"\[RightVector]"]}]
Now you can type vv
followed by a space to get a placeholder into which you type the desired letter(s). Then you can press the arrow navigation keys or Ctrl-. repeatedly to get out of the placeholder when done.