added tab handling

added event handling for the tab key