SmallFix Keyboard Input

Put the code in OnKeyDown, and in OnKeyUp left only PERIOD key handling
(because ctrl+space was first inserting a spacechar then invoking
autocomplete which was a bit confusing)