got one key with scan code working but needs cleanup and more knowledge on how to unpress the button.
changed repeat behavior now key repeat works.
optimized buffer clearing