Simplify special key handling. Should be more efficient too :-)