added handling of tabs
handle keycodes