GUI: Check if button is of type TabWidget

Changes to code for checking for Tab keys, so it only handles the key down state if the widget is of type TabWidget.